Class SHA224withECDSA
java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.SHA224withECDSA
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 SHA224 Secure Hashing Algorithm prior to signature
generation.
-
Field Summary
Fields inherited from class SignatureSpi
appRandom -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a signature object for the Elliptic Curve digital signature algorithm with SHA224 message digest. -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectengineGetParameter(String param) Deprecated.protected voidengineInitSign(PrivateKey privateKey) Initializes this signature object with the specified Elliptic Curve private key for signing operations.protected voidengineInitVerify(PublicKey publicKey) Initializes this signature object with the specified Elliptic Curve public key for verification operations.protected voidengineSetParameter(String param, Object value) 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[] 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 booleanengineVerify(byte[] sigBytes) Verifies the passed-in signature.Methods inherited from class SignatureSpi
clone, engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
SHA224withECDSA
Construct a signature object for the Elliptic Curve digital signature algorithm with SHA224 message digest. It must be initialized before it can 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:
engineInitSignin 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:
engineInitVerifyin 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:
engineUpdatein 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:
engineUpdatein 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- ifoffandlenvalues 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:
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:
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:
engineGetParameterin 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:
engineSetParameterin classSignatureSpi- Throws:
UnsupportedOperationException- is always thrownInvalidParameterException
-