Class DatawithDSA

java.lang.Object
java.security.SignatureSpi
com.ibm.crypto.hdwrCCA.provider.DatawithDSA

public class DatawithDSA extends SignatureSpi
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.

  • Constructor Details

  • Method Details

    • engineGetParameter

      @Deprecated protected Object engineGetParameter(String param) throws UnsupportedOperationException
      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 class SignatureSpi
      Parameters:
      param - the string name of the parameter
      Throws:
      UnsupportedOperationException - is always thrown.
    • engineInitSign

      protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException
      Initializes this signature object with the specified private key for signing operations.
      Specified by:
      engineInitSign in class SignatureSpi
      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

      protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException
      Initializes this signature object with the specified public key for verification operations.
      Specified by:
      engineInitVerify in class SignatureSpi
      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 class SignatureSpi
      Throws:
      UnsupportedOperationException - is always thrown.
    • engineSign

      protected byte[] engineSign() throws SignatureException
      Returns the signature bytes of all the data updated so far.
      Specified by:
      engineSign in class SignatureSpi
      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

      protected void engineUpdate(byte b) throws SignatureException
      Updates the data to be signed or verified using the specified byte.
      Specified by:
      engineUpdate in class SignatureSpi
      Parameters:
      b - the byte to use for the update
      Throws:
      SignatureException - if the engine is not initialized properly.
    • engineUpdate

      protected void engineUpdate(byte[] buffer, int offset, int length) throws SignatureException
      Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.
      Specified by:
      engineUpdate in class SignatureSpi
      Parameters:
      buffer - the array of bytes
      offset - the offset to start from in the array of bytes
      length - the number of bytes to use, starting at offset
      Throws:
      SignatureException - if the engine is not initialized properly
    • engineVerify

      protected boolean engineVerify(byte[] sigBytes) throws SignatureException
      Verifies the passed-in signature.
      Specified by:
      engineVerify in class SignatureSpi
      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

      public String toString()
      returns a string containing a concise, human-readable description of this signature class.
      Overrides:
      toString in class Object
      Returns:
      a printable representation of this signature class.