Class ECDSASigningHandler
- java.lang.Object
-
- org.forgerock.json.jose.jws.handlers.ECDSASigningHandler
-
- All Implemented Interfaces:
SigningHandler
@Deprecated public class ECDSASigningHandler extends Object implements SigningHandler
Deprecated.UseSecretECDSASigningHandler
insteadElliptic Curve Digital Signature Algorithm (ECDSA) signing and verification.
-
-
Constructor Summary
Constructors Constructor Description ECDSASigningHandler(ECPrivateKey signingKey)
Deprecated.Constructs the ECDSA signing handler for signing only.ECDSASigningHandler(ECPublicKey verificationKey)
Deprecated.Constructs the ECDSA signing handler for verification only.ECDSASigningHandler(PrivateKey signingKey)
Deprecated.Constructs the ECDSA signing handler for signing only.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description byte[]
sign(JwsAlgorithm algorithm, byte[] data)
Deprecated.Signs the given raw data bytes using the Java Cryptographic algorithm defined by the JwsAlgorithm.byte[]
sign(JwsAlgorithm algorithm, String data)
Deprecated.Signs the given String data using the Java Cryptographic algorithm defined by the JwsAlgorithm.boolean
verify(JwsAlgorithm algorithm, byte[] data, byte[] signature)
Deprecated.Verifies that the given signature is valid for the given data.
-
-
-
Constructor Detail
-
ECDSASigningHandler
public ECDSASigningHandler(PrivateKey signingKey)
Deprecated.Constructs the ECDSA signing handler for signing only.- Parameters:
signingKey
- the private key to use for signing. Must not be null.
-
ECDSASigningHandler
public ECDSASigningHandler(ECPrivateKey signingKey)
Deprecated.Constructs the ECDSA signing handler for signing only.- Parameters:
signingKey
- the private key to use for signing. Must not be null.
-
ECDSASigningHandler
public ECDSASigningHandler(ECPublicKey verificationKey)
Deprecated.Constructs the ECDSA signing handler for verification only.- Parameters:
verificationKey
- the public key to use for verification. Must not be null.
-
-
Method Detail
-
sign
public byte[] sign(JwsAlgorithm algorithm, String data)
Deprecated.Description copied from interface:SigningHandler
Signs the given String data using the Java Cryptographic algorithm defined by the JwsAlgorithm. The signature is created using the given private key.- Specified by:
sign
in interfaceSigningHandler
- Parameters:
algorithm
- The JwsAlgorithm defining the Java Cryptographic algorithm.data
- The data to be signed.- Returns:
- A byte array of the signature.
-
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 interfaceSigningHandler
- 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)
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 interfaceSigningHandler
- Parameters:
algorithm
- The JwsAlgorithm defining the JavaCryptographic algorithm.data
- The data that was signed.signature
- The signature of the data.- Returns:
true
if the signature is a valid signature of the data.
-
-