Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

WinCAPICryptoHash Class Reference

#include <WinCAPICryptoHash.hpp>

Inheritance diagram for WinCAPICryptoHash:

Inheritance graph
[legend]
Collaboration diagram for WinCAPICryptoHash:

Collaboration graph
[legend]
List of all members.

Public Methods

 WinCAPICryptoHash (WinCAPICryptoProvider *owner, XSECCryptoHash::HashType alg)
virtual ~WinCAPICryptoHash ()
virtual void setKey (XSECCryptoKey *key)
virtual void reset (void)
 Rest the hash function. More...

virtual void hash (unsigned char *data, unsigned int length)
 Hash some data. More...

virtual unsigned int finish (unsigned char *hash, unsigned int maxLength)
 Finish up a Digest operation and read the result. More...

virtual HashType getHashType (void)
 WinCAPICryptoHash (XSECCryptoHash::HashType alg)
virtual ~WinCAPICryptoHash ()
virtual void setKey (XSECCryptoKey *key)
virtual void reset (void)
 Rest the hash function. More...

virtual void hash (unsigned char *data, unsigned int length)
 Hash some data. More...

virtual unsigned int finish (unsigned char *hash, unsigned int maxLength)
 Finish up a Digest operation and read the result. More...

virtual HashType getHashType (void)

Constructor & Destructor Documentation

WinCAPICryptoHash::WinCAPICryptoHash WinCAPICryptoProvider   owner,
XSECCryptoHash::HashType    alg
 

virtual WinCAPICryptoHash::~WinCAPICryptoHash   [virtual]
 

WinCAPICryptoHash::WinCAPICryptoHash XSECCryptoHash::HashType    alg
 

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 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 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::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.

XSEC will call the reset() function prior to re-using a CryptoHash object.

Implements XSECCryptoHash.

virtual void WinCAPICryptoHash::reset void    [virtual]
 

Rest the hash function.

XSEC will call the reset() function prior to re-using a CryptoHash object.

Implements XSECCryptoHash.

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

The HMAC classes are treated in the library as standard hash objects that just happen to take a key. Thus all hash functions implement this function (potentially just to throw an exception)

Sets the key - which needs to have a base class of XSECCryptoKeyHMAC.

Parameters:
key  The key the HMAC function should use.

Implements XSECCryptoHash.

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

The HMAC classes are treated in the library as standard hash objects that just happen to take a key. Thus all hash functions implement this function (potentially just to throw an exception)

Sets the key - which needs to have a base class of XSECCryptoKeyHMAC.

Parameters:
key  The key the HMAC function should use.

Implements XSECCryptoHash.


The documentation for this class was generated from the following files:
Generated on Thu May 8 20:17:36 2003 for XML-Security-C by doxygen1.2.15