SHA-224 hash function class. More...

#include <sha224.h>

Public Member Functions

 SHA224 ()
 Constructs a SHA-224 hash generator. More...
void add (const void *data, int size)
 Adds data to be hashed. More...
void add (const DataBuffer &data)
 Add. More...
void calculate ()
 Finalize hash calculation. More...
std::string get_hash (bool uppercase=false) const
 Returns the calculated hash. More...
void get_hash (unsigned char out_hash[hash_size]) const
 Get hash. More...
void reset ()
 Resets the hash generator. More...
void set_hmac (const void *key_data, int key_size)
 Enable a HMAC based calculation. More...

Static Public Attributes

static const int hash_size = 28

Detailed Description

SHA-224 hash function class.

Constructor & Destructor Documentation

clan::SHA224::SHA224 ( )

Constructs a SHA-224 hash generator.

Member Function Documentation

void clan::SHA224::add ( const void *  data,
int  size 

Adds data to be hashed.

void clan::SHA224::add ( const DataBuffer data)


data= Data Buffer
void clan::SHA224::calculate ( )

Finalize hash calculation.

std::string clan::SHA224::get_hash ( bool  uppercase = false) const

Returns the calculated hash.

void clan::SHA224::get_hash ( unsigned char  out_hash[hash_size]) const

Get hash.

out_hash= where to write to
void clan::SHA224::reset ( )

Resets the hash generator.

void clan::SHA224::set_hmac ( const void *  key_data,
int  key_size 

Enable a HMAC based calculation.

Call this function before the initial add(). It is reset by reset()

key_data= The HMAC key
key_size= The size of the key_data

Member Data Documentation

const int clan::SHA224::hash_size = 28

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