|QuickHash Library||C++ Interface|
template< class T > class CHMAC
Template parameter specifying the type of the hash object used for calculations. It can be one of the following: CMD4, CMD5, CSHA1, CSHA256, CSHA512, CSHA384, CRIPEMD128, CRIPEMD160, CRIPEMD256, CRIPEMD320, CPanama, CTiger.
CHMAC class assists you in generating Keyed-Hash Message Authentication Codes (HMACs).
HMACs can be generated in two modes: accumulative and non-accumulative.
The accumulative mode is applied when the data for which the HMAC is calculated (data) represents one or more continuous memory block(s) or when the data is created at runtime in many steps (for instance, when reading a file).
Non-accumulative mode can be applied when the data represents only one continuous memory block.
Note. When the data represents just one continuous memory block, both methods can be applied.
To generate the HMAC in the accumulative mode, perform the following:
Instantiate a CHMAC object.
Call the Update member function for each continuous memory block of data to perform the calculations.
Note. Call the FinalHex member function when you need to retrieve the hexadecimal string representation of the HMAC.
To generate the HMAC in the non-accumulative mode, perform the following:
Note. Call the CalculateHex static member function when you need to retrieve the hexadecimal string representation of the HMAC.
using namespace QuickHash;
Class Members | Useful Links | HashCalc
|Send Feedback to SlavaSoft Inc.||Tell a friend about QuickHash Library|