com.ibm.crypto.hdwrCCA.provider
Class DatawithECDSA
- java.lang.Object
-
- java.security.SignatureSpi
-
- com.ibm.crypto.hdwrCCA.provider.DatawithECDSA
-
public final class DatawithECDSA extends java.security.SignatureSpiThis class is a concrete implementation of the Signature service provider interface for signing data with no hashing.
-
-
Constructor Summary
Constructors Constructor and Description DatawithECDSA()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description protected java.lang.ObjectengineGetParameter(java.lang.String param)Deprecated.protected voidengineInitSign(java.security.PrivateKey privateKey)Initializes this signature object with the specified Elliptic Curve private key for signing operations.protected voidengineInitVerify(java.security.PublicKey publicKey)Initializes this signature object with the specified Elliptic Curve public key for verification operations.protected voidengineSetParameter(java.lang.String param, java.lang.Object value)Deprecated.protected byte[]engineSign()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.
-
-
-
Method Detail
-
engineInitSign
protected void engineInitSign(java.security.PrivateKey privateKey) throws java.security.InvalidKeyExceptionInitializes this signature object with the specified Elliptic Curve private key for signing operations.- Specified by:
engineInitSignin classjava.security.SignatureSpi- Parameters:
privateKey- the Elliptic Curve private key of the identity whose signature will be generated- Throws:
java.security.InvalidKeyException- if the key is improperly encoded or if the parameters are missing
-
engineInitVerify
protected void engineInitVerify(java.security.PublicKey publicKey) throws java.security.InvalidKeyExceptionInitializes this signature object with the specified Elliptic Curve public key for verification operations.- Specified by:
engineInitVerifyin classjava.security.SignatureSpi- Parameters:
publicKey- the Elliptic Curve public key of the identity whose signature is going to be verified- Throws:
java.security.InvalidKeyException- if the key is improperly encoded or if the parameters are missing
-
engineUpdate
protected void engineUpdate(byte b) throws java.security.SignatureExceptionUpdates the data to be signed or verified using the specified byte.- Specified by:
engineUpdatein classjava.security.SignatureSpi- Parameters:
b- the byte to use for the update- Throws:
java.security.SignatureException- if the engine is not initialized properly
-
engineUpdate
protected void engineUpdate(byte[] b, int off, int len) throws java.security.SignatureExceptionUpdates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.- Specified by:
engineUpdatein classjava.security.SignatureSpi- 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:
java.security.SignatureException- if the engine is not initialized properlyjava.lang.NullPointerException- if the array of bytes is nulljava.lang.IndexOutOfBoundsException- ifoffandlenvalues are inappropriate for the supplied array of bytes
-
engineSign
protected byte[] engineSign() throws java.security.SignatureExceptionReturns the signature bytes of all the data updated so far.- Specified by:
engineSignin classjava.security.SignatureSpi- Returns:
- the signature bytes of the signing operation's result
- Throws:
java.security.SignatureException- if the engine is not initialized properly or if this signature algorithm is unable to process the input data provided
-
engineVerify
protected boolean engineVerify(byte[] sigBytes) throws java.security.SignatureExceptionVerifies the passed-in signature.- Specified by:
engineVerifyin classjava.security.SignatureSpi- Parameters:
sigBytes- the signature bytes to be verified- Returns:
- true if the signature was verified, false if not
- Throws:
java.security.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 providedjava.lang.NullPointerException- if the signature bytes is null
-
engineGetParameter
@Deprecated protected java.lang.Object engineGetParameter(java.lang.String param) throws java.security.InvalidParameterExceptionDeprecated.Gets the value of the specified algorithm parameter. This method has no meaning for this provider.- Specified by:
engineGetParameterin classjava.security.SignatureSpi- Throws:
java.lang.UnsupportedOperationException- is always thrownjava.security.InvalidParameterException
-
engineSetParameter
@Deprecated protected void engineSetParameter(java.lang.String param, java.lang.Object value) throws java.security.InvalidParameterExceptionDeprecated.Sets the specified algorithm parameter to the specified value. This method has no meaning for this provider.- Specified by:
engineSetParameterin classjava.security.SignatureSpi- Throws:
java.lang.UnsupportedOperationException- is always thrownjava.security.InvalidParameterException
-
-