From a2828f6ae67c3d7294118a8144b1b2ec431237c4 Mon Sep 17 00:00:00 2001 From: weidai Date: Thu, 22 Jul 2004 00:51:57 +0000 Subject: fix documentation, fix PanamaMAC, fix algorithm names git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@186 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- iterhash.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'iterhash.h') diff --git a/iterhash.h b/iterhash.h index b4e2682..7e82591 100644 --- a/iterhash.h +++ b/iterhash.h @@ -8,6 +8,7 @@ NAMESPACE_BEGIN(CryptoPP) +//! _ template class CRYPTOPP_NO_VTABLE IteratedHashBase : public BASE { @@ -15,8 +16,6 @@ public: typedef T HashWordType; IteratedHashBase() : m_countHi(0), m_countLo(0) {} - void SetBlockSize(unsigned int blockSize) {m_data.resize(blockSize / sizeof(HashWordType));} - void SetStateSize(unsigned int stateSize) {m_digest.resize(stateSize / sizeof(HashWordType));} unsigned int BlockSize() const {return m_data.size() * sizeof(T);} unsigned int OptimalBlockSize() const {return BlockSize();} unsigned int OptimalDataAlignment() const {return sizeof(T);} @@ -25,6 +24,9 @@ public: void Restart(); protected: + void SetBlockSize(unsigned int blockSize) {m_data.resize(blockSize / sizeof(HashWordType));} + void SetStateSize(unsigned int stateSize) {m_digest.resize(stateSize / sizeof(HashWordType));} + T GetBitCountHi() const {return (m_countLo >> (8*sizeof(T)-3)) + (m_countHi << 3);} T GetBitCountLo() const {return m_countLo << 3;} @@ -48,7 +50,7 @@ CRYPTOPP_STATIC_TEMPLATE_CLASS IteratedHashBase; CRYPTOPP_STATIC_TEMPLATE_CLASS IteratedHashBase; -//! . +//! _ template class CRYPTOPP_NO_VTABLE IteratedHashBase2 : public IteratedHashBase { @@ -68,7 +70,7 @@ protected: virtual void HashEndianCorrectedBlock(const HashWordType *data) =0; }; -//! . +//! _ template class CRYPTOPP_NO_VTABLE IteratedHash : public IteratedHashBase2 { @@ -80,6 +82,7 @@ protected: IteratedHash() {this->SetBlockSize(T_BlockSize);} }; +//! _ template class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform : public ClonableImpl, T_Transform> > -- cgit v1.2.1