ClanLib  2.3.7
List of all members
CL_SHA512_256 Class Reference

SHA-512_256 hash function class. More...

#include <sha512_256.h>

Public Member Functions

Construction
 CL_SHA512_256 ()
 Constructs a SHA-512_256 hash generator. More...
 
Operations
void reset ()
 Resets the hash generator. More...
 
void set_hmac (const void *key_data, int key_size)
 Enable a HMAC based calculation. More...
 
void add (const void *data, int size)
 Adds data to be hashed. More...
 
void add (const CL_DataBuffer &data)
 Add. More...
 
void calculate ()
 Finalize hash calculation. More...
 

Attributes

static const int hash_size = 32
 
CL_String8 get_hash (bool uppercase=false) const
 Returns the calculated hash. More...
 
void get_hash (unsigned char out_hash[hash_size]) const
 Get hash. More...
 

Detailed Description

SHA-512_256 hash function class.

Constructor & Destructor Documentation

CL_SHA512_256::CL_SHA512_256 ( )

Constructs a SHA-512_256 hash generator.

Member Function Documentation

void CL_SHA512_256::add ( const void *  data,
int  size 
)

Adds data to be hashed.

void CL_SHA512_256::add ( const CL_DataBuffer data)

Add.

Parameters
data= Data Buffer
void CL_SHA512_256::calculate ( )

Finalize hash calculation.

CL_String8 CL_SHA512_256::get_hash ( bool  uppercase = false) const

Returns the calculated hash.

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

Get hash.

Parameters
out_hash= where to write to
void CL_SHA512_256::reset ( )

Resets the hash generator.

void CL_SHA512_256::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()

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

Member Data Documentation

const int CL_SHA512_256::hash_size = 32
static

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