Class EdDSASigningHandler

java.lang.Object
org.forgerock.json.jose.jws.handlers.EdDSASigningHandler
All Implemented Interfaces:
SigningHandler

@Deprecated public final class EdDSASigningHandler extends Object implements SigningHandler
Deprecated.
Signing handler for Edwards Curve DSA (EdDSA) as defined in RFC 8037.
  • Method Details

    • forSigning

      public static EdDSASigningHandler forSigning(byte[] privateKey)
      Deprecated.
      Initialises a signing handler for signing.
      Parameters:
      privateKey - the private key bytes.
      Returns:
      the signing handler.
    • forSigning

      public static EdDSASigningHandler forSigning(PrivateKey signingKey)
      Deprecated.
      Initialises a signing handler for signing.
      Parameters:
      signingKey - the private key.
      Returns:
      the signing handler.
    • forVerification

      public static EdDSASigningHandler forVerification(byte[] publicKey)
      Deprecated.
      Initialises a signing handler for verification.
      Parameters:
      publicKey - the public key bytes.
      Returns:
      the signing handler.
    • forVerification

      public static EdDSASigningHandler forVerification(PublicKey publicKey)
      Deprecated.
      Initialises a signing handler for verification.
      Parameters:
      publicKey - the public key.
      Returns:
      the signing handler.
    • sign

      public byte[] sign(JwsAlgorithm algorithm, byte[] data)
      Deprecated.
      Description copied from interface: SigningHandler
      Signs the given raw data bytes using the Java Cryptographic algorithm defined by the JwsAlgorithm.
      Specified by:
      sign in interface SigningHandler
      Parameters:
      algorithm - the JWS signature algorithm to use.
      data - the raw data to sign.
      Returns:
      the signature.
    • verify

      public boolean verify(JwsAlgorithm algorithm, byte[] data, byte[] sig)
      Deprecated.
      Description copied from interface: SigningHandler
      Verifies that the given signature is valid for the given data.

      Uses the Java Cryptographic algorithm defined by the JwsAlgorithm and private key to create a new signature of the data to compare against the given signature to see if they are identical.

      Specified by:
      verify in interface SigningHandler
      Parameters:
      algorithm - The JwsAlgorithm defining the JavaCryptographic algorithm.
      data - The data that was signed.
      sig - The signature of the data.
      Returns:
      true if the signature is a valid signature of the data.