Class SignedKey

  • All Implemented Interfaces:
    CryptoProviderUnit

    public class SignedKey
    extends java.lang.Object
    implements CryptoProviderUnit
    A class representing a cryptographic key with its corresponding digital signature. The functionality of this class is independent of the underlying crypto library.
    • Field Detail

      • key

        public final AKey key
      • sign

        public final Sign sign
    • Constructor Detail

      • SignedKey

        public SignedKey​(AKey key,
                         Signer signer)
      • SignedKey

        public SignedKey​(AKey key,
                         Sign sign)
    • Method Detail

      • key

        public AKey key()
      • sign

        public Sign sign()
      • check

        public boolean check​(AKey.SignPublic signer)
        Checks if the key's signature is valid using a Signer. The Signer object is responsible for the actual verification process.
        Parameters:
        signer - The Signer object to perform the verification.
        Returns:
        true if the signature is valid, false otherwise.
      • check

        public boolean check​(SignChecker signChecker)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object