Class EDDSASigner

  • All Implemented Interfaces:
    JwsSigner

    public class EDDSASigner
    extends AbstractJwsSigner
    Implementing the AbstractJwsSigner, that uses EDDSA for signing.
    Version:
    January 20, 2021
    Author:
    Sergey Manoylo
    • Constructor Detail

      • EDDSASigner

        public EDDSASigner​(SignatureAlgorithm signatureAlgorithm,
                           EDDSAPrivateKey eddsaPrivateKey)
        Constructor.
        Parameters:
        signatureAlgorithm - signature algorithm.
        eddsaPrivateKey - eddsa private key.
      • EDDSASigner

        public EDDSASigner​(SignatureAlgorithm signatureAlgorithm,
                           EDDSAPublicKey eddsaPublicKey)
        Constructor.
        Parameters:
        signatureAlgorithm - signature algorithm.
        eddsaPublicKey - eddsa public key.
      • EDDSASigner

        public EDDSASigner​(SignatureAlgorithm signatureAlgorithm,
                           Certificate certificate)
        Constructor.
        Parameters:
        signatureAlgorithm - signature algorithm.
        certificate - certificate (uses RSA, EcDSA, EdDSA).
    • Method Detail

      • generateSignature

        public java.lang.String generateSignature​(java.lang.String signingInput)
                                           throws java.security.SignatureException
        Generating a signature, using URL safe based format.
        Specified by:
        generateSignature in class AbstractJwsSigner
        Throws:
        java.security.SignatureException
      • validateSignature

        public boolean validateSignature​(java.lang.String signingInput,
                                         java.lang.String signature)
                                  throws java.security.SignatureException
        Validating a signature.
        Specified by:
        validateSignature in class AbstractJwsSigner
        Throws:
        java.security.SignatureException