java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.DatawithDSA
This class is a concrete DSA signing with data implementation of the Service
Provider Interface (SPI) for the Signature class, which is used to provide
the functionality of a digital signature algorithm.
This documentation is provided for implementation insight only. This class is not intended to be called directly by application developers. Please consult the 'Java Cryptography Architecture Standard' for details on how to use this interface through a public standard class.
-
Field Summary
Fields inherited from class java.security.SignatureSpi
appRandom
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
engineGetParameter
(String param) Deprecated.protected void
engineInitSign
(PrivateKey privateKey) Initializes this signature object with the specified private key for signing operations.protected void
engineInitVerify
(PublicKey publicKey) Initializes this signature object with the specified 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[] buffer, int offset, int length) 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.toString()
returns a string containing a concise, human-readable description of this signature class.Methods inherited from class java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineSetParameter, engineSign, engineUpdate, engineVerify
-
Constructor Details
-
DatawithDSA
Constructs a new instance of this class.
-
-
Method Details
-
engineGetParameter
Deprecated.Gets the value of the specified algorithm parameter. Please note that this method has no meaning for this provider, and has been deprecated.- Specified by:
engineGetParameter
in classSignatureSpi
- Parameters:
param
- the string name of the parameter- Throws:
UnsupportedOperationException
- is always thrown.
-
engineInitSign
Initializes this signature object with the specified private key for signing operations.- Specified by:
engineInitSign
in classSignatureSpi
- Parameters:
privateKey
- the private key of the identity whose signature will be generated- Throws:
InvalidKeyException
- if the specified key is not a valid DSA private key (improperly encoded, parameters missing, etc).
-
engineInitVerify
Initializes this signature object with the specified public key for verification operations.- Specified by:
engineInitVerify
in classSignatureSpi
- Parameters:
publicKey
- the public key of the identity whose signature is going to be verified- Throws:
InvalidKeyException
- if the specified key is not a valid DSA public key (improperly encoded, parameters missing, etc).
-
engineSetParameter
@Deprecated protected void engineSetParameter(String param, Object value) throws UnsupportedOperationException Deprecated.Sets the specified algorithm parameter to the specified value. Please note that this method has no meaning for this provider and has been deprecated.- Specified by:
engineSetParameter
in classSignatureSpi
- Throws:
UnsupportedOperationException
- is always thrown.
-
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.
-
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:
buffer
- the array of bytesoffset
- the offset to start from in the array of byteslength
- the number of bytes to use, starting at offset- Throws:
SignatureException
- if the engine is not initialized properly
-
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:
SignatureException
- 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.
-
toString
returns a string containing a concise, human-readable description of this signature class.
-