Interface Crypto

  • All Superinterfaces:
    KeyPairProvider
    All Known Implementing Classes:
    EdDsaCrypto

    public interface Crypto
    extends KeyPairProvider
    An implementation of the interface provides algorithm-specific cryptography functionality.
    • Method Detail

      • getAlgorithm

        java.lang.String getAlgorithm()
        Returns the Java name of the algorithm used by this crypto.
        Returns:
        the algorithm
      • signer

        Signer signer​(java.lang.String keyId,
                      java.security.PrivateKey privateKey)
        Creates a new signer using the specified key.
        Parameters:
        keyId - the id of the key used
        privateKey - the private key to be used
        Returns:
        a signer
      • verifier

        Verifier verifier​(java.security.PublicKey publicKey)
        Creates a new verifier using the specified public key.
        Parameters:
        publicKey - the public key to be used
        Returns:
        a verifier