Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

WinCAPICryptoHash Class Reference
[Windows Crypto API Interface]

#include <WinCAPICryptoHash.hpp>

Inheritance diagram for WinCAPICryptoHash:

Inheritance graph
[legend]
Collaboration diagram for WinCAPICryptoHash:

Collaboration graph
[legend]
List of all members.

Detailed Description

Windows Crypto API Implementation of Hash functions.

Uses the Windows Crypt functions to perform digest functions.


Public Member Functions

Constructors/Destructors
 WinCAPICryptoHash (HCRYPTPROV prov, XSECCryptoHash::HashType alg)
 Construct a Hash object.
virtual ~WinCAPICryptoHash ()
HMAC Functions
virtual void setKey (XSECCryptoKey *key)
Digest/Hash functions
virtual void reset (void)
 Rest the hash function.
virtual void hash (unsigned char *data, unsigned int length)
 Hash some data.
virtual unsigned int finish (unsigned char *hash, unsigned int maxLength)
 Finish up a Digest operation and read the result.
Information functions
virtual HashType getHashType (void)


Constructor & Destructor Documentation

WinCAPICryptoHash::WinCAPICryptoHash HCRYPTPROV  prov,
XSECCryptoHash::HashType  alg
 

Construct a Hash object.

Creates a Windows Crypto API based hash object of the required type.

Parameters:
prov handle to a provider that supports the required algorithm. Both PROV_RSA_FULL and PROV_DSS support MD5 and SHA1
alg The algorithm to use for digest operations

virtual WinCAPICryptoHash::~WinCAPICryptoHash  )  [virtual]
 


Member Function Documentation

virtual unsigned int WinCAPICryptoHash::finish unsigned char *  hash,
unsigned int  maxLength
[virtual]
 

Finish up a Digest operation and read the result.

This call tells the CryptoHash object that the input is complete and to finalise the Digest. The output of the digest is read into the hash buffer (at most maxLength bytes)

Parameters:
hash The buffer the hash should be read into.
maxLength The maximum number of bytes to be read into hash
Returns:
The number of bytes copied into the hash buffer

Implements XSECCryptoHash.

virtual HashType WinCAPICryptoHash::getHashType void   )  [virtual]
 

Determine the hash type of this object

Returns:
The hash type

Implements XSECCryptoHash.

virtual void WinCAPICryptoHash::hash unsigned char *  data,
unsigned int  length
[virtual]
 

Hash some data.

Take length bytes of data from the data buffer and update the hash that already exists. This function may (and normally will) be called many times for large blocks of data.

Parameters:
data The buffer containing the data to be hashed.
length The number of bytes to be read from data

Implements XSECCryptoHash.

virtual void WinCAPICryptoHash::reset void   )  [virtual]
 

Rest the hash function.

Re-initialises the digest structure.

Implements XSECCryptoHash.

virtual void WinCAPICryptoHash::setKey XSECCryptoKey key  )  [inline, virtual]
 

Does nothing. If the required function is an HMAC function, then WinCAPICryptoHashHMAC should be used.

Parameters:
key The key the HMAC function should use.

Implements XSECCryptoHash.


The documentation for this class was generated from the following file:
Generated on Sun Jul 3 17:43:29 2005 for XML-Security-C by  doxygen 1.4.2