be.cardon.cryptoapi
Class CAPIHash

java.lang.Object
  extended by be.cardon.cryptoapi.CAPIHash

public class CAPIHash
extends java.lang.Object


Constructor Summary
CAPIHash(int hashHandle)
          Creates a new instance of CAPIHash
 
Method Summary
 void finalize()
           
 void hashData(byte[] data)
          Hash data (no flags)
 void hashData(byte[] data, int dwFlags)
          Hash data
 byte[] signHash()
          Sign the Hash.
 byte[] signHash(int dwKeySpec, int dwFlags)
          Sign the hash, with the given key specifications and optional flags.
static int StringToalgID(java.lang.String hashAlgorithm)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CAPIHash

public CAPIHash(int hashHandle)
         throws CryptoAPIException
Creates a new instance of CAPIHash

Throws:
CryptoAPIException
Method Detail

signHash

public byte[] signHash()
                throws CryptoAPIException
Sign the Hash. Returns the signature in big endian. This function may be used only if the hash has been created using c reateHash(CAPIPrivateKey privKey, int algID)

Throws:
CryptoAPIException

signHash

public byte[] signHash(int dwKeySpec,
                       int dwFlags)
                throws CryptoAPIException
Sign the hash, with the given key specifications and optional flags. Returns the signature in big endian.

Throws:
CryptoAPIException

hashData

public void hashData(byte[] data,
                     int dwFlags)
              throws CryptoAPIException
Hash data

Throws:
CryptoAPIException

hashData

public void hashData(byte[] data)
              throws CryptoAPIException
Hash data (no flags)

Throws:
CryptoAPIException

finalize

public void finalize()
              throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

StringToalgID

public static int StringToalgID(java.lang.String hashAlgorithm)
                         throws CryptoAPIException
Throws:
CryptoAPIException