public abstract class ExternalHashSignature extends PKCS11Signature
| Modifier and Type | Field and Description | 
|---|---|
| protected java.security.MessageDigest | messageDigest_Used to hash the incoming data before sending the hash to the token. | 
currentKeyIsSoftwareKey_, initialized_, operationState_, pkcs11OperationInitialized_, privateKey_, publicKey_, session_, SIGN, softwareDelegate_, tokenManager_, usedMechanismInfos_, usedMechanisms_, VERIFY| Modifier | Constructor and Description | 
|---|---|
| protected  | ExternalHashSignature()Default constructor for subclasses only. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected abstract iaik.pkcs.pkcs11.Mechanism | getMechanism()Get the mechanism of this signature object. | 
| protected java.security.MessageDigest | getMessageDigest()Returns the Message digest engine that this object uses to hash the data. | 
| protected abstract java.lang.String | getMessageDigestName()Returns the message digest's name that this object uses to hash the data. | 
| protected void | pkcs11InitSign(java.security.PrivateKey privateKey)SPI: Initializes this Signature object with the given RSA private key for going to sign
 some data. | 
| protected void | pkcs11InitVerify(java.security.PublicKey publicKey)SPI: Initializes this Signature object with the given RSA public key for performing a
 signature verification. | 
| protected byte[] | pkcs11Sign()Sign the generated hash. | 
| protected void | pkcs11Update(byte dataByte)SPI: Updates the data to be signed or verified with the specified byte. | 
| protected void | pkcs11Update(byte[] data,
            int offset,
            int length)SPI: Updates the data to be signed or verified with the specified number of bytes,
 beginning at the specified offset within the given byte array. | 
| protected boolean | pkcs11Verify(byte[] signature)Verifies the given signature of a message according to PKCS#1. | 
| protected byte[] | prepareHash(byte[] rawHash)Prepares the hash for input to the signature function. | 
engineGetParameter, engineInitSign, engineInitVerify, engineSetParameter, engineSetParameter, engineSign, engineUpdate, engineUpdate, engineVerify, finalize, finalizePkcs11Operation, getAlgorithmName, getUsedMechanismFeatures, getUsedMechanisms, initializePkcs11Operation, initializeSession, initializeSoftwareDelegate, isSupportedBy, pkcs11GetParameter, pkcs11SetParameter, pkcs11SetParameterprotected java.security.MessageDigest messageDigest_
protected ExternalHashSignature()
protected java.security.MessageDigest getMessageDigest()
                                                throws IAIKPkcs11Exception
IAIKPkcs11Exception - If creating the digest object fails.protected abstract java.lang.String getMessageDigestName()
protected byte[] prepareHash(byte[] rawHash)
                      throws IAIKPkcs11Exception
rawHash - The raw hash value; i.e. the 20 bytes of a SHA-1 hash.IAIKPkcs11Exception - If the hash cannot be prepared for any reason.protected abstract iaik.pkcs.pkcs11.Mechanism getMechanism()
getMechanism in class PKCS11Signatureprotected void pkcs11InitVerify(java.security.PublicKey publicKey)
                         throws java.security.InvalidKeyException
pkcs11InitVerify in class PKCS11SignaturepublicKey - The RSA public key belonging to the RSA private key that has been used for signing.java.security.InvalidKeyException - If a key encoding error occurs.protected void pkcs11InitSign(java.security.PrivateKey privateKey)
                       throws java.security.InvalidKeyException
pkcs11InitSign in class PKCS11SignatureprivateKey - The RSA private key to be used for signing.java.security.InvalidKeyException - If a key encoding error occurs.protected void pkcs11Update(byte dataByte)
                     throws java.security.SignatureException
pkcs11Update in class PKCS11SignaturedataByte - The byte to be used for updating.java.security.SignatureException - If updating the signature fails.protected void pkcs11Update(byte[] data,
                            int offset,
                            int length)
                     throws java.security.SignatureException
pkcs11Update in class PKCS11Signaturedata - The byte array holding the data to be used for this update operation.offset - The offset, indicating the start position within the given byte array.length - The number of bytes to be obtained from the given byte array, starting at the given
          position.java.security.SignatureException - If updating the signature failsprotected byte[] pkcs11Sign()
                     throws java.security.SignatureException
pkcs11Sign in class PKCS11Signaturejava.security.SignatureException - If an error occurs when creating the signature.protected boolean pkcs11Verify(byte[] signature)
                        throws java.security.SignatureException
pkcs11Verify in class PKCS11Signaturesignature - The signature bytes to be verified.true if signature is OK, false otherwise.java.security.SignatureException - If an error occurs when verifying the signature.IAIK JavaSecurity Website https://jce.iaik.tugraz.at/
                             
 IAIK at Graz University of Technology, Austria, Europe                             
 Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.                                                      Version 1.9.4