QuickHash Library C++ Interface

CHMAC::CHMAC

CHMAC();

explicit CHMAC( const unsigned char* pKey, unsigned int nKeyLength = DEFAULTKEYLEN );

Parameters

pKey

    [in] Pointer to the key.

 nKeyLength

    [in] Length in bytes of the key.  

Remarks

Both constructors create and initialize new CHMAC objects. A brief description of both of these constructors follows.

Examples

 

//Declare a local CHMAC object that will use the SHA-1 hash algorithm for calculations

CHMAC<CSHA1> hmac;

//Declare a dynamic CHMAC object that will use the RIPEMD160 hash algorithm for calculations

CHMAC<CRIPEMD160>* pHMAC = new CHMAC<CRIPEMD160>;

 

char key[] = "My password";

//Declare a local CHMAC object that will use the MD5 hash algorithm for calculations

CHMAC<CMD5> hmac( (const unsigned char*)key, strlen( key ) );

//Declare a dynamic CHMAC object that will use the TIGER hash algorithm for calculations

CHMAC<CTiger>* pHMAC = new CHMAC<CTiger>( (const unsigned char*)key, strlen( key ) );

 

 

CHMAC Overview   |   Class Members   |   Useful Links   |   HashCalc

 

See Also    CHMAC::Init


 

 

Send Feedback to SlavaSoft Inc. Tell a friend about QuickHash Library