Public Member Functions

ats::CryptoContext Class Reference

Protocol class for a crypto hash context. More...

#include <CryptoHash.h>

Inherited by MD5Context, MMHContext, and URLHashContext.

Public Member Functions

virtual ~CryptoContext ()
 Destructor (force virtual).
virtual bool update (void const *data, int length)=0
 Update the hash with data of length bytes.
virtual bool finalize (CryptoHash &hash)=0
 Finalize and extract the hash.
bool finalize (CryptoHash *hash)
 Convenience overload.
virtual bool hash_immediate (CryptoHash &hash, void const *data, int length)
 Convenience - compute final hash for data.

Detailed Description

Protocol class for a crypto hash context.

A hash of this type is used for strong hashing, such as for URLs.

Definition at line 91 of file CryptoHash.h.


Constructor & Destructor Documentation

virtual ats::CryptoContext::~CryptoContext (  )  [inline, virtual]

Destructor (force virtual).

Definition at line 96 of file CryptoHash.h.


Member Function Documentation

virtual bool ats::CryptoContext::finalize ( CryptoHash hash  )  [pure virtual]

Finalize and extract the hash.

Implemented in MD5Context, MMHContext, and URLHashContext.

Referenced by finalize(), hash_immediate(), url_MD5_get_fast(), and url_MD5_get_general().

bool ats::CryptoContext::finalize ( CryptoHash hash  )  [inline]

Convenience overload.

Definition at line 115 of file CryptoHash.h.

References finalize().

bool ats::CryptoContext::hash_immediate ( CryptoHash hash,
void const *  data,
int  length 
) [inline, virtual]

Convenience - compute final hash for data.

Note:
This is just as fast as the previous style, as a new context must be initialized everytime this is done.

Definition at line 112 of file CryptoHash.h.

References finalize(), and update().

virtual bool ats::CryptoContext::update ( void const *  data,
int  length 
) [pure virtual]

Update the hash with data of length bytes.

Implemented in MD5Context, MMHContext, and URLHashContext.

Referenced by hash_immediate(), url_MD5_get_fast(), and url_MD5_get_general().


The documentation for this class was generated from the following file: