#include <XSECCryptoHash.hpp>
Inheritance diagram for XSECCryptoHash:
Public Types | |
enum | HashType { HASH_NONE = 0, HASH_SHA1 = 1 } |
Enumeration of Hash (Digest) types. More... | |
Public Methods | |
XSECCryptoHash () | |
virtual | ~XSECCryptoHash () |
virtual void | setKey (XSECCryptoKey *key)=0 |
Digest/Hash functions | |
virtual void | reset (void)=0 |
Rest the hash function. More... | |
virtual void | hash (unsigned char *data, unsigned int length)=0 |
Hash some data. More... | |
virtual unsigned int | finish (unsigned char *hash, unsigned int maxLength)=0 |
Finish up a Digest operation and read the result. More... | |
Information functions | |
virtual HashType | getHashType (void)=0 |
The XSECCryptoHash function is used by the library to manipulate Hashing (Digest) functions.
It is also used as the base class for HMAC functions, and thus has a setKey() method.
|
Enumeration of Hash (Digest) types.
The hash types known to XSEC |
|
|
|
|
|
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)
Implemented in OpenSSLCryptoHash, and OpenSSLCryptoHashHMAC. |
|
Determine the hash type of this object
Implemented in OpenSSLCryptoHash, and OpenSSLCryptoHashHMAC. |
|
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.
Implemented in OpenSSLCryptoHash, and OpenSSLCryptoHashHMAC. |
|
Rest the hash function.
XSEC will call the reset() function prior to re-using a CryptoHash object. Implemented in OpenSSLCryptoHash, and OpenSSLCryptoHashHMAC. |
|
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.
Implemented in OpenSSLCryptoHash, and OpenSSLCryptoHashHMAC. |