java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.DatawithECDSA
This class is a concrete implementation of the Signature service provider
interface for signing data with no hashing.
-
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom -
Constructor Summary
Constructors -
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 java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
DatawithECDSA
public DatawithECDSA()Constructor
-
-
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 or if the parameters are missing
-
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 or if the parameters are missing
-
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:
SignatureException- if the engine is not initialized properlyNullPointerException- if the array of bytes is nullIndexOutOfBoundsException- ifoffandlenvalues are inappropriate for the supplied array of bytes
-
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:
SignatureException- if the engine is not initialized properly, the passed-in signature is improperly encoded or the wrong type, or if this signature algorithm is unable to process the input data providedNullPointerException- if the signature bytes is null
-
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
-