Class NOPSigningHandler
java.lang.Object
org.forgerock.json.jose.jws.handlers.NOPSigningHandler
- All Implemented Interfaces:
SigningHandler
An implementation of the SigningHandler which does not perform any signing or verifying.
- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]sign(JwsAlgorithm algorithm, byte[] data) Returns an empty byte array.byte[]sign(JwsAlgorithm algorithm, String data) Simply returns a byte array of a UTF-8 empty string.booleanverify(JwsAlgorithm algorithm, byte[] data, byte[] signature) Verifies that the signature length is zero.
-
Constructor Details
-
NOPSigningHandler
public NOPSigningHandler()
-
-
Method Details
-
sign
Simply returns a byte array of a UTF-8 empty string.- Specified by:
signin interfaceSigningHandler- Parameters:
algorithm- The JwsAlgorithm defining the Java Cryptographic algorithm.data- The data to be signed.- Returns:
- A byte array of the signature.
-
sign
Returns an empty byte array.- Specified by:
signin interfaceSigningHandler- Parameters:
algorithm- the JWS signature algorithm to use.data- the raw data to sign.- Returns:
- the signature.
-
verify
Verifies that the signature length is zero.- Specified by:
verifyin interfaceSigningHandler- 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.
-