java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.DatawithRSA
This class is a concrete RSA signing with data implementation of the Service
Provider Interface (SPI) for the Signature class, which is used to provide
the functionality of a digital signature algorithm.
This documentation is provided for implementation insight only. This class is not intended to be called directly by application developers. Please consult the 'Java Cryptography Architecture Standard' for details on how to use this interface through a public standard class.
-
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectengineGetParameter(String key) Deprecated.protected voidengineInitSign(PrivateKey privateKey) Initializes this signature object with the specified private key for signing operations.protected voidengineInitVerify(PublicKey publicKey) Initializes this signature object with the specified public key for verification operations.protected voidengineSetParameter(String key, Object param) Deprecated.protected byte[]Returns the signature bytes of all the data updated so far.protected voidengineUpdate(byte b) Updates the data to be signed or verified using the specified byte.protected voidengineUpdate(byte[] buff, int off, int len) Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.protected booleanengineVerify(byte[] signature) Verifies the passed-in signature.Methods inherited from class java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
DatawithRSA
Construct a blank RSA signature object. This object must be initialized before being used for signing or verifying.
-
-
Method Details
-
engineSetParameter
@Deprecated protected void engineSetParameter(String key, Object param) throws UnsupportedOperationException Deprecated.Sets the specified algorithm parameter to the specified value. Please note that this method has no meaning for this provider and has been deprecated.- Specified by:
engineSetParameterin classSignatureSpi- Parameters:
key- the string identifier of the parameterparam- the parameter value- Throws:
UnsupportedOperationException- is always thrown.
-
engineGetParameter
Deprecated.Gets the value of the specified algorithm parameter. Please note that this method has no meaning for this provider, and has been deprecated.- Specified by:
engineGetParameterin classSignatureSpi- Parameters:
key- the string name of the parameter- Throws:
UnsupportedOperationException- is always thrown.
-
engineInitSign
Initializes this signature object with the specified private key for signing operations.- Specified by:
engineInitSignin classSignatureSpi- Parameters:
privateKey- the private key of the identity whose signature will be generated- Throws:
InvalidKeyException- if the specified key is not a valid RSA private key (improperly encoded, parameters missing, etc).
-
engineInitVerify
Initializes this signature object with the specified public key for verification operations.- Specified by:
engineInitVerifyin classSignatureSpi- Parameters:
publicKey- the public key of the identity whose signature is going to be verified- Throws:
InvalidKeyException- if the specified key is not a valid RSA public key (improperly encoded, parameters missing, etc).
-
engineUpdate
Updates the data to be signed or verified using the specified byte.- Specified by:
engineUpdatein classSignatureSpi- Parameters:
b- the byte to use for the update- Throws:
SignatureException
-
engineUpdate
Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.- Specified by:
engineUpdatein classSignatureSpi- Parameters:
buff- the array of bytesoff- the offset to start from in the array of byteslen- the number of bytes to use, starting at offset- Throws:
SignatureException
-
engineSign
Returns the signature bytes of all the data updated so far.- Specified by:
engineSignin classSignatureSpi- Returns:
- the signature bytes of the signing operation's result.
- Throws:
SignatureException- if the engine is not initialized properly or if this signature algorithm is unable to process the input data provided.
-
engineVerify
Verifies the passed-in signature.- Specified by:
engineVerifyin classSignatureSpi- Parameters:
signature- the signature bytes to be verified- Returns:
- true if the signature was verified, false if not.
- Throws:
SignatureException- if the engine is not initialized properly, the passed-in signature is improperly encoded or of the wrong type, if this signature algorithm is unable to process the input data provided, etc.
-