java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.SHA1withRSA
This class is a concrete implementation for RSA signing with SHA1.
-
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Object
engineGetParameter
(String key) Deprecated.protected void
engineInitSign
(PrivateKey privateKey) Initialize this signature object with a RSA private key.protected void
engineInitVerify
(PublicKey publicKey) Initialize the RSA object with a RSA public key.protected void
engineSetParameter
(String key, Object param) Deprecated.protected byte[]
Get message digest for all the data thus far updated, then sign the message digest.protected void
engineUpdate
(byte b) Add a byte to the digest to be signed or verified.protected void
engineUpdate
(byte[] data, int off, int len) Add an array of bytes to the digest to be signed or verified.protected boolean
engineVerify
(byte[] signature) Verify the signature (compare the result with the message digest).Methods inherited from class java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
SHA1withRSA
Construct a blank RSA object. It must be initialized before being usable for signing or verifying.- Throws:
NoSuchAlgorithmException
- is thrown when if the Algorithm can not be found.NoSuchProviderException
- is thrown the provider can not be found.
-
-
Method Details
-
engineSetParameter
@Deprecated protected void engineSetParameter(String key, Object param) throws UnsupportedOperationException Deprecated.Have to implement Signature's abstract method engineSetParameter to be a concrete class. However, this method has no meaning for this provider.- Specified by:
engineSetParameter
in classSignatureSpi
- Throws:
UnsupportedOperationException
- is always thrown.
-
engineGetParameter
Deprecated.Have to implement Signature's abstract method engineGetParameter to be a concrete class. However, this method has no meaning for this provider.- Specified by:
engineGetParameter
in classSignatureSpi
- Throws:
UnsupportedOperationException
- is always thrown.
-
engineInitSign
Initialize this signature object with a RSA private key.- Specified by:
engineInitSign
in classSignatureSpi
- Parameters:
privateKey
- the RSA private key- Throws:
InvalidKeyException
- ifprivateKey
is not a valid RSA private key.
-
engineInitVerify
Initialize the RSA object with a RSA public key.- Specified by:
engineInitVerify
in classSignatureSpi
- Parameters:
publicKey
- the RSA public key.- Throws:
InvalidKeyException
- if the key is not a valid RSA public key.
-
engineUpdate
Add a byte to the digest to be signed or verified.- Specified by:
engineUpdate
in classSignatureSpi
- Parameters:
b
- the byte to updated.- Throws:
SignatureException
-
engineUpdate
Add an array of bytes to the digest to be signed or verified.- Specified by:
engineUpdate
in classSignatureSpi
- Parameters:
data
- the array bytes to be added to the digest.off
- the offset into the array to start the update.len
- length of the array.- Throws:
SignatureException
-
engineSign
Get message digest for all the data thus far updated, then sign the message digest.- Specified by:
engineSign
in classSignatureSpi
- Returns:
- the signature.
- Throws:
SignatureException
- if the signature object was not properly initialized, or if another exception occurs.
-
engineVerify
Verify the signature (compare the result with the message digest).- Specified by:
engineVerify
in classSignatureSpi
- Parameters:
signature
- the signature to be verified.- Throws:
SignatureException
- if the signature object was not properly initialized, or if another exception occurs.
-