Class VaultSignature

java.lang.Object
java.security.SignatureSpi
org.honton.chas.jca.vault.provider.signature.VaultSignature

public class VaultSignature extends SignatureSpi
  • Constructor Details

  • Method Details

    • getVaultInstance

      protected VaultApi getVaultInstance()
    • engineInitVerify

      protected void engineInitVerify(PublicKey publicKey)
      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.
    • engineInitSign

      protected void engineInitSign(PrivateKey privateKey)
      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. on.
    • engineUpdate

      protected void engineUpdate(byte b)
      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.
    • engineUpdate

      protected void engineUpdate(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.
      Specified by:
      engineUpdate in class SignatureSpi
      Parameters:
      b - the array of bytes
      off - the offset to start from in the array of bytes
      len - the number of bytes to use, starting at offset
    • engineSign

      protected byte[] engineSign()
      Returns the signature bytes of all the data updated so far. The format of the signature depends on the underlying signature scheme.
      Specified by:
      engineSign in class SignatureSpi
      Returns:
      the signature bytes of the signing operation's result.
    • engineVerify

      protected boolean engineVerify(byte[] sigBytes)
      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.
    • engineSetParameter

      protected void engineSetParameter(String s, Object o) throws InvalidParameterException
      Specified by:
      engineSetParameter in class SignatureSpi
      Throws:
      InvalidParameterException
    • engineGetParameter

      protected Object engineGetParameter(String param) throws InvalidParameterException
      Specified by:
      engineGetParameter in class SignatureSpi
      Throws:
      InvalidParameterException