1 #ifndef CRYPTOPP_ITERHASH_H
2 #define CRYPTOPP_ITERHASH_H
6 NAMESPACE_BEGIN(CryptoPP)
8 // *** trimmed down dependency from iterhash.h ***
9 template <class T_HashWordType, class T_Endianness, unsigned int T_BlockSize, unsigned int T_StateSize, class T_Transform, unsigned int T_DigestSize = 0, bool T_StateAligned = false>
10 class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform
13 CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize ? T_DigestSize : T_StateSize)
14 unsigned int DigestSize() const {return DIGESTSIZE;};
15 typedef T_HashWordType HashWordType;
16 CRYPTOPP_CONSTANT(BLOCKSIZE = T_BlockSize)
19 IteratedHashWithStaticTransform() {this->Init();}
20 void HashEndianCorrectedBlock(const T_HashWordType *data) {T_Transform::Transform(this->m_state, data);}
21 void Init() {T_Transform::InitState(this->m_state);}
23 T_HashWordType* StateBuf() {return this->m_state;}
24 FixedSizeAlignedSecBlock<T_HashWordType, T_BlockSize/sizeof(T_HashWordType), T_StateAligned> m_state;