#include <CPipeHMAC_SHA1.h>
Inheritance diagram for AxPipe::Stock::CPipeHMAC_SHA1< iBits >:
Public Member Functions | |
CPipeHMAC_SHA1< iBits > * | Init (TBits< iBits > *pKey, size_t cbOffset=0) |
Initialize the key and possibly an offset when to start HMAC'ing. | |
Protected Member Functions | |
void | Out (CSeg *pSeg) |
Hash and pass onwards. | |
bool | OutOpen () |
Do the inner wrap. | |
bool | OutClose () |
Do the outer wrap. | |
Private Member Functions | |
void | XorPad (unsigned char oPad) |
Helper for the inner and outer padding and Xor. | |
Private Attributes | |
TBits< 160 > | m_HMAC |
HMAC intermediate. | |
TBits< iBits > | m_Key |
The key provied in Init(). | |
size_t | m_cbOffset |
Offset from where to start HMAC'ing. |
Define the bitlength in the template instantiation.
Definition at line 42 of file CPipeHMAC_SHA1.h.
|
Initialize the key and possibly an offset when to start HMAC'ing. Initialize the key and the offset.
Definition at line 64 of file CPipeHMAC_SHA1.cpp. References AxPipe::Stock::CPipeHMAC_SHA1< iBits >::m_cbOffset, and AxPipe::Stock::CPipeHMAC_SHA1< iBits >::m_Key. |
|
Hash and pass onwards. Hash the data into the HMAC, skipping if necessary. All data is passed unchanged, although segment boundaries may change.
Reimplemented from AxPipe::Stock::CPipeSHA1. Definition at line 75 of file CPipeHMAC_SHA1.cpp. References AxPipe::CSeg::Clone(), AxPipe::CSeg::Drop(), AxPipe::CSeg::Len(), AxPipe::Stock::CPipeHMAC_SHA1< iBits >::m_cbOffset, and AxPipe::CPipe::Pump(). |
|
Do the outer wrap. Do the outer hash of the padded and XOR'ed key, and also finalize the HMAC in the form of a hash. You get the hash by calling GetHash(), and the number of bytes processed with CountBytes().
Reimplemented from AxPipe::Stock::CPipeSHA1. Definition at line 113 of file CPipeHMAC_SHA1.cpp. References ASSAPI, AxPipe::Stock::CPipeHMAC_SHA1< iBits >::m_HMAC, and AxPipe::Stock::CPipeHMAC_SHA1< iBits >::XorPad(). |
|
Do the inner wrap. Do the inner hash of the padded and XOR'ed key
Reimplemented from AxPipe::Stock::CPipeSHA1. Definition at line 96 of file CPipeHMAC_SHA1.cpp. References ASSAPI, AxPipe::Stock::CPipeHMAC_SHA1< iBits >::m_HMAC, and AxPipe::Stock::CPipeHMAC_SHA1< iBits >::XorPad(). |
|
Helper for the inner and outer padding and Xor. Do the HMAC XOR operation, with the inner or outer pad. Basically its the value XOR the Key, but if the key is shorter, we simulate zero-extending it.
Definition at line 49 of file CPipeHMAC_SHA1.cpp. References AxPipe::Stock::CPipeHMAC_SHA1< iBits >::m_HMAC, and AxPipe::Stock::CPipeHMAC_SHA1< iBits >::m_Key. Referenced by AxPipe::Stock::CPipeHMAC_SHA1< iBits >::OutClose(), and AxPipe::Stock::CPipeHMAC_SHA1< iBits >::OutOpen(). |