Module ibm.crypto.ibmjcehybrid
Class SHA1withECDSAHybrid
java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.ibmjcehybrid.provider.SHA1withECDSAHybrid
This class is a facade for signatures using ECDSA with SHA1.
-
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
engineGetParameter
(String key) Deprecated.Replaced by engineGetParameters()protected AlgorithmParameters
Call the Signature object's getParameters().protected void
engineInitSign
(PrivateKey privateKey) Initialize the RSA 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.Replaced by engineSetParameter(AlgorithmParameterSpec parmSpec)protected void
engineSetParameter
(AlgorithmParameterSpec parmSpec) engineSetParameter()protected byte[]
Get the 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 inside the signature -- this digest will be signed or verified.protected void
engineUpdate
(byte[] data) Add an array of bytes to the digest inside the signature -- this digest will be signed or verified.protected void
engineUpdate
(byte[] data, int off, int len) Add an array of bytes to the digest inside the signature -- this digest will be signed or verified.protected boolean
engineVerify
(byte[] signature) Verify the signature (compare the result with the message digest inside the signature).protected boolean
engineVerify
(byte[] signature, int off, int len) Verify the signature (compare the result with the message digest inside the signature).protected void
Creates an instance of the Signature.Methods inherited from class java.security.SignatureSpi
clone, engineInitSign, engineSign, engineUpdate
-
Constructor Details
-
SHA1withECDSAHybrid
Creates an instance of the SHA1withECDSAHybrid class.- Throws:
RuntimeException
- Program error has occurred.
-
-
Method Details
-
engineSetParameter
@Deprecated protected void engineSetParameter(String key, Object param) throws UnsupportedOperationException Deprecated.Replaced by engineSetParameter(AlgorithmParameterSpec parmSpec)engineSetParameter()- Specified by:
engineSetParameter
in classSignatureSpi
- Parameters:
key
- The key for computing (or verifying) the signature.param
- Signature parameters.- Throws:
UnsupportedOperationException
- is always thrown see above.
-
engineSetParameter
protected void engineSetParameter(AlgorithmParameterSpec parmSpec) throws InvalidAlgorithmParameterException engineSetParameter()- Overrides:
engineSetParameter
in classSignatureSpi
- Parameters:
parmSpec
- The key and value of the parameter- Throws:
UnsupportedOperationException
- is always thrown see above.InvalidAlgorithmParameterException
-
engineGetParameter
Deprecated.Replaced by engineGetParameters()Call the Signature object's getParameter().- Specified by:
engineGetParameter
in classSignatureSpi
- Parameters:
key
- The name of the parameter.- Returns:
- the object representing the value of the specified parameter.
- Throws:
UnsupportedOperationException
- if thrown by the object
-
engineGetParameters
Call the Signature object's getParameters().- Overrides:
engineGetParameters
in classSignatureSpi
- Throws:
UnsupportedOperationException
- if thrown by the object
-
engineInitSign
Initialize the RSA object with a RSA private key.- Specified by:
engineInitSign
in classSignatureSpi
- Parameters:
privateKey
- the RSA private key.- Throws:
InvalidKeyException
- if the key 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
protected void engineUpdate(byte b) Add a byte to the digest inside the signature -- this digest will be signed or verified.- Specified by:
engineUpdate
in classSignatureSpi
- Parameters:
b
- the byte to updated.
-
engineUpdate
protected void engineUpdate(byte[] data) Add an array of bytes to the digest inside the signature -- this digest will be signed or verified.- Parameters:
data
- the array bytes to be added to the signature.
-
engineUpdate
protected void engineUpdate(byte[] data, int off, int len) Add an array of bytes to the digest inside the signature -- this digest will be signed or verified.- Specified by:
engineUpdate
in classSignatureSpi
- Parameters:
data
- the array bytes to be added to the signature.off
- the offset into the array to start the update.len
- length of the array.
-
engineSign
Get the 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 inside the signature).- 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.
-
engineVerify
Verify the signature (compare the result with the message digest inside the signature).- Overrides:
engineVerify
in classSignatureSpi
- Parameters:
signature
- the signature to be verified.off
- the offset in signature[] of the signature to be verified.len
- the numbers of bytes in the signature to be verified.- Throws:
SignatureException
- if the signature object was not properly initialized, or if another exception occurs.
-
getSignature
protected void getSignature()Creates an instance of the Signature.- Throws:
RuntimeException
- if this method fails to create and to initialize the message digest within the signature.
-