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

OpenSSLCryptoHashHMAC Class Reference
[OpenSSL Interface]

#include <OpenSSLCryptoHashHMAC.hpp>

Inheritance diagram for OpenSSLCryptoHashHMAC:

Inheritance graph
[legend]
Collaboration diagram for OpenSSLCryptoHashHMAC:

Collaboration graph
[legend]
List of all members.

Detailed Description

Implementation of HMAC Hash functions in OpenSSL.

Uses the OpenSSL EVP_digest functions to implement the various HMAC hash functions required by the library.


Public Member Functions

virtual void reset (void)
 Reset 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.
Constructors and Destructors
 OpenSSLCryptoHashHMAC (XSECCryptoHash::HashType alg)
 Constructor.
virtual ~OpenSSLCryptoHashHMAC ()
 Destructor.
HMAC Functions
virtual void setKey (XSECCryptoKey *key)
 Set the HMAC key.
virtual const XMLCh * getProviderName ()
 Return the string identifier for the OpenSSL interface.
Information functions
virtual HashType getHashType (void)


Constructor & Destructor Documentation

OpenSSLCryptoHashHMAC::OpenSSLCryptoHashHMAC XSECCryptoHash::HashType  alg  ) 
 

Constructor.

Create the object, with the indicated algorithm (Currently supports MD5 and SHA1)

Parameters:
alg Digest algorithm to use

virtual OpenSSLCryptoHashHMAC::~OpenSSLCryptoHashHMAC  )  [virtual]
 

Destructor.

Destroy the object. Will ensure any key material is also destroyed


Member Function Documentation

virtual unsigned int OpenSSLCryptoHashHMAC::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). This is effectively the signature for the data that has been run through the HMAC function.

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 OpenSSLCryptoHashHMAC::getHashType void   )  [virtual]
 

Determine the hash type of this object

Returns:
The hash type

Implements XSECCryptoHash.

virtual const XMLCh* OpenSSLCryptoHashHMAC::getProviderName  )  [inline, virtual]
 

Return the string identifier for the OpenSSL interface.

virtual void OpenSSLCryptoHashHMAC::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 OpenSSLCryptoHashHMAC::reset void   )  [virtual]
 

Reset the hash function.

Re-initialises the digest structure.

Implements XSECCryptoHash.

virtual void OpenSSLCryptoHashHMAC::setKey XSECCryptoKey key  )  [virtual]
 

Set the HMAC key.

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

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:42:00 2005 for XML-Security-C by  doxygen 1.4.2