Class SecretECDSASigningHandler
- java.lang.Object
 - 
- org.forgerock.json.jose.jws.handlers.SecretSigningHandler
 - 
- org.forgerock.json.jose.jws.handlers.SecretECDSASigningHandler
 
 
 
- 
- All Implemented Interfaces:
 SigningHandler
public class SecretECDSASigningHandler extends SecretSigningHandler
Elliptic Curve Digital Signature Algorithm (ECDSA) signing and verification. 
- 
- 
Constructor Summary
Constructors Constructor Description SecretECDSASigningHandler(SigningKey signingKey)Constructs a new SecretECDSASigningHandler for creating signature with the givensigningKey.SecretECDSASigningHandler(VerificationKey verificationKey)Constructs a new SecretECDSASigningHandler for verifying signature with the givenverificationKey. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]sign(JwsAlgorithm algorithm, byte[] data)Signs the given raw data bytes using the Java Cryptographic algorithm defined by the JwsAlgorithm.booleanverify(JwsAlgorithm algorithm, byte[] data, byte[] signature)Verifies that the given signature is valid for the given data.- 
Methods inherited from class org.forgerock.json.jose.jws.handlers.SecretSigningHandler
validateAlgorithm 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.forgerock.json.jose.jws.handlers.SigningHandler
sign 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
SecretECDSASigningHandler
public SecretECDSASigningHandler(SigningKey signingKey)
Constructs a new SecretECDSASigningHandler for creating signature with the givensigningKey.- Parameters:
 signingKey- key to use for signature creation
 
- 
SecretECDSASigningHandler
public SecretECDSASigningHandler(VerificationKey verificationKey)
Constructs a new SecretECDSASigningHandler for verifying signature with the givenverificationKey.- Parameters:
 verificationKey- key to use for signature verification
 
 - 
 
- 
Method Detail
- 
sign
public byte[] sign(JwsAlgorithm algorithm, byte[] data)
Description copied from interface:SigningHandlerSigns the given raw data bytes using the Java Cryptographic algorithm defined by the JwsAlgorithm.- Specified by:
 signin interfaceSigningHandler- Overrides:
 signin classSecretSigningHandler- 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[] signature)
Description copied from interface:SigningHandlerVerifies 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:
 verifyin interfaceSigningHandler- Overrides:
 verifyin classSecretSigningHandler- Parameters:
 algorithm- The JwsAlgorithm defining the JavaCryptographic algorithm.data- The data that was signed.signature- The signature of the data.- Returns:
 trueif the signature is a valid signature of the data.
 
 - 
 
 -