java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.SHA5withECDSA
This class provides an implementation of the Service Provider Interface
(SPI) for the Signature class, which is used to provide the functionality
of a digital signature algorithm. Digital signatures are used for
authentication and integrity assurance of digital data. The data will be
hashed using the SHA512 Secure Hashing Algorithm prior to signature
generation. The alias names "SHA5/ECDSA" and "SHA5withECDSA" which refer to
this implementation are deprecated, use "SHA512withECDSA" as a replacement
alias name.
-
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a signature object for the Elliptic Curve digital signature algorithm with SHA5 message digest. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
engineGetParameter
(String param) Deprecated.protected void
engineInitSign
(PrivateKey privateKey) Initializes this signature object with the specified Elliptic Curve private key for signing operations.protected void
engineInitVerify
(PublicKey publicKey) Initializes this signature object with the specified Elliptic Curve public key for verification operations.protected void
engineSetParameter
(String param, Object value) Deprecated.protected byte[]
Returns the signature bytes of all the data updated so far.protected void
engineUpdate
(byte b) Updates the data to be signed or verified using the specified byte.protected void
engineUpdate
(byte[] b, int off, int len) Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.protected boolean
engineVerify
(byte[] sigBytes) Verifies the passed-in signature.Methods inherited from class java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
SHA5withECDSA
Construct a signature object for the Elliptic Curve digital signature algorithm with SHA5 message digest. It must be initialized before being able to be used for signing or verifying.- Throws:
NoSuchAlgorithmException
- if the message digest algorithm can not be found
-
-
Method Details
-
engineInitSign
Initializes this signature object with the specified Elliptic Curve private key for signing operations.- Specified by:
engineInitSign
in classSignatureSpi
- Parameters:
privateKey
- the Elliptic Curve private key of the identity whose signature will be generated- Throws:
InvalidKeyException
- if the key is improperly encoded, parameters are missing, and so on
-
engineInitVerify
Initializes this signature object with the specified Elliptic Curve public key for verification operations.- Specified by:
engineInitVerify
in classSignatureSpi
- Parameters:
publicKey
- the Elliptic Curve public key of the identity whose signature is going to be verified- Throws:
InvalidKeyException
- if the key is improperly encoded, parameters are missing, and so on
-
engineUpdate
Updates the data to be signed or verified using the specified byte.- Specified by:
engineUpdate
in classSignatureSpi
- Parameters:
b
- the byte to use for the update- Throws:
SignatureException
- if the engine is not initialized properly
-
engineUpdate
Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.- Specified by:
engineUpdate
in classSignatureSpi
- Parameters:
b
- the array of bytesoff
- the offset to start from in the array of byteslen
- the number of bytes to use, starting at offset- Throws:
NullPointerException
- if the array of bytes is nullIndexOutOfBoundsException
- ifoff
andlen
values are not appropriate for the specified array of bytesSignatureException
- if the engine is not initialized properly
-
engineSign
Returns the signature bytes of all the data updated so far.- Specified by:
engineSign
in 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:
engineVerify
in classSignatureSpi
- Parameters:
sigBytes
- the signature bytes to be verified- Returns:
- true if the signature was verified, false if not
- Throws:
NullPointerException
- if signature bytes to be verified is nullSignatureException
- 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
-
engineGetParameter
Deprecated.Gets the value of the specified algorithm parameter. This method has no meaning for this provider.- Specified by:
engineGetParameter
in classSignatureSpi
- Throws:
UnsupportedOperationException
- is always thrownInvalidParameterException
-
engineSetParameter
@Deprecated protected void engineSetParameter(String param, Object value) throws InvalidParameterException Deprecated.Sets the specified algorithm parameter to the specified value. This method has no meaning for this provider.- Specified by:
engineSetParameter
in classSignatureSpi
- Throws:
UnsupportedOperationException
- is always thrownInvalidParameterException
-