Class MD2withRSA
java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.MD2withRSA
This class implements signatures using MD2 and RSA
-
Field Summary
Fields inherited from class SignatureSpi
appRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectengineGetParameter(String string) Deprecated.protected voidengineInitSign(PrivateKey privateKey) Initialize this signature object with a RSA private key.protected voidengineInitVerify(PublicKey publicKey) Initialize the RSA object with a RSA public key.protected voidengineSetParameter(String string, Object object) Deprecated.protected voidHave to implement Signature's abstract method engineSetParameter to be a concrete class.protected byte[]Get message digest for all the data thus far updated, then sign the message digest.protected voidengineUpdate(byte b) Update a byte to be signed or verified.protected voidengineUpdate(byte[] data, int off, int len) Update an array of bytes to be signed or verified.protected booleanengineVerify(byte[] signature) Verify the signature (compare the result with the message digest).Methods inherited from class SignatureSpi
clone, engineGetParameters, engineInitSign, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
MD2withRSA
Construct a blank RSA object. It must be initialized before being usable for signing or verifying.- Throws:
RuntimeException- Program error has occurred.
-
-
Method Details
-
engineSetParameter
protected void engineSetParameter(AlgorithmParameterSpec param) throws UnsupportedOperationException Have to implement Signature's abstract method engineSetParameter to be a concrete class. However, this method has no meaning for this provider.- Overrides:
engineSetParameterin classSignatureSpi- Throws:
UnsupportedOperationException- is always thrown.
-
engineSetParameter
@Deprecated protected void engineSetParameter(String string, Object object) 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:
engineSetParameterin classSignatureSpi- Throws:
UnsupportedOperationException- is always thrown.
-
engineGetParameter
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:
engineGetParameterin classSignatureSpi- Throws:
UnsupportedOperationException- is always thrown.
-
engineInitSign
Initialize this signature object with a RSA private key.- Specified by:
engineInitSignin classSignatureSpi- Parameters:
privateKey- the RSA private key- Throws:
InvalidKeyException- ifprivateKeyis not a valid RSA private key.
-
engineInitVerify
Initialize the RSA object with a RSA public key.- Specified by:
engineInitVerifyin classSignatureSpi- Parameters:
publicKey- the RSA public key.- Throws:
InvalidKeyException- if the key is not a valid RSA public key.
-
engineUpdate
protected void engineUpdate(byte b) Update a byte to be signed or verified.- Specified by:
engineUpdatein classSignatureSpi- Parameters:
b- the byte to updated.
-
engineUpdate
protected void engineUpdate(byte[] data, int off, int len) Update an array of bytes to be signed or verified.- Specified by:
engineUpdatein classSignatureSpi- Parameters:
data- the bytes to be updated.
-
engineSign
Get message digest for all the data thus far updated, then sign the message digest.- Specified by:
engineSignin 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:
engineVerifyin classSignatureSpi- Throws:
SignatureException- if the signature object was not properly initialized, or if another exception occurs.
-