00001 #pragma once 00002 00034 #include <wincrypt.h> 00035 #include "TBits.h" 00036 #include "CPipeSHA1.h" 00037 00038 namespace AxPipe { 00039 namespace Stock { 00043 template <int iBits> class CPipeHMAC_SHA1 : public CPipeSHA1 { 00044 TBits<160> m_HMAC; 00045 TBits<iBits> m_Key; 00046 size_t m_cbOffset; 00047 void XorPad(unsigned char oPad); 00048 protected: 00049 void Out(CSeg *pSeg); 00050 bool OutOpen(); 00051 bool OutClose(); 00052 public: 00054 CPipeHMAC_SHA1<iBits> *Init(TBits<iBits> *pKey, size_t cbOffset = 0); 00055 }; 00056 } 00057 }