com.ibm.crypto.hdwrCCA.provider
Class DatawithDSA
- java.lang.Object
-
- java.security.SignatureSpi
-
- com.ibm.crypto.hdwrCCA.provider.DatawithDSA
-
public class DatawithDSA extends java.security.SignatureSpiThis 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.
-
-
Constructor Summary
Constructors Constructor and Description DatawithDSA()Constructs a new instance of this class.
-
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 private key for signing operations.protected voidengineInitVerify(java.security.PublicKey publicKey)Initializes this signature object with the specified 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[] 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 booleanengineVerify(byte[] sigBytes)Verifies the passed-in signature.java.lang.StringtoString()returns a string containing a concise, human-readable description of this signature class.
-
-
-
Constructor Detail
-
DatawithDSA
public DatawithDSA() throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderExceptionConstructs a new instance of this class.- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.NoSuchProviderException
-
-
Method Detail
-
engineGetParameter
protected java.lang.Object engineGetParameter(java.lang.String param) throws java.lang.UnsupportedOperationExceptionDeprecated.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:
engineGetParameterin classjava.security.SignatureSpi- Parameters:
param- the string name of the parameter- Throws:
java.lang.UnsupportedOperationException- is always thrown.
-
engineInitSign
protected void engineInitSign(java.security.PrivateKey privateKey) throws java.security.InvalidKeyExceptionInitializes this signature object with the specified private key for signing operations.- Specified by:
engineInitSignin classjava.security.SignatureSpi- Parameters:
privateKey- the private key of the identity whose signature will be generated- Throws:
java.security.InvalidKeyException- if the specified key is not a valid DSA private key (improperly encoded, parameters missing, etc).
-
engineInitVerify
protected void engineInitVerify(java.security.PublicKey publicKey) throws java.security.InvalidKeyExceptionInitializes this signature object with the specified public key for verification operations.- Specified by:
engineInitVerifyin classjava.security.SignatureSpi- Parameters:
publicKey- the public key of the identity whose signature is going to be verified- Throws:
java.security.InvalidKeyException- if the specified key is not a valid DSA public key (improperly encoded, parameters missing, etc).
-
engineSetParameter
protected void engineSetParameter(java.lang.String param, java.lang.Object value) throws java.lang.UnsupportedOperationExceptionDeprecated.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:
engineSetParameterin classjava.security.SignatureSpi- Throws:
java.lang.UnsupportedOperationException- is always thrown.
-
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.
-
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[] buffer, int offset, int length) 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:
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:
java.security.SignatureException- if the engine is not initialized properly
-
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 of the wrong type, if this signature algorithm is unable to process the input data provided, etc.
-
toString
public java.lang.String toString()
returns a string containing a concise, human-readable description of this signature class.- Overrides:
toStringin classjava.lang.Object- Returns:
- a printable representation of this signature class.
-
-