summaryrefslogtreecommitdiff
path: root/iterhash.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-12-14 11:41:39 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2006-12-14 11:41:39 +0000
commit085c5b2d0b70a2ff3d9ccf8616a7bdf4abbc957f (patch)
treebe3960f1424e79719ea9c5f6152df003bc1c44f3 /iterhash.h
parent60b7db799a5d9d607dba4b9a66c4421bb60f2577 (diff)
downloadcryptopp-085c5b2d0b70a2ff3d9ccf8616a7bdf4abbc957f.tar.gz
port to Borland C++Builder 2006
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@260 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'iterhash.h')
-rw-r--r--iterhash.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/iterhash.h b/iterhash.h
index 2f417ce..7db3c4f 100644
--- a/iterhash.h
+++ b/iterhash.h
@@ -62,8 +62,9 @@ public:
typedef T_Endianness ByteOrderClass;
typedef T_HashWordType HashWordType;
- enum {BLOCKSIZE = T_BlockSize};
- CRYPTOPP_COMPILE_ASSERT((BLOCKSIZE & (BLOCKSIZE - 1)) == 0); // blockSize is a power of 2
+ CRYPTOPP_CONSTANT(BLOCKSIZE = T_BlockSize)
+ // BCB2006 workaround: can't use BLOCKSIZE here
+ CRYPTOPP_COMPILE_ASSERT((T_BlockSize & (T_BlockSize - 1)) == 0); // blockSize is a power of 2
ByteOrder GetByteOrder() const {return T_Endianness::ToEnum();}
@@ -77,12 +78,12 @@ protected:
};
//! _
-template <class T_HashWordType, class T_Endianness, unsigned int T_BlockSize, unsigned int T_StateSize, class T_Transform, unsigned int T_DigestSize = T_StateSize>
+template <class T_HashWordType, class T_Endianness, unsigned int T_BlockSize, unsigned int T_StateSize, class T_Transform, unsigned int T_DigestSize = 0>
class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform
: public ClonableImpl<T_Transform, AlgorithmImpl<IteratedHash<T_HashWordType, T_Endianness, T_BlockSize>, T_Transform> >
{
public:
- enum {DIGESTSIZE = T_DigestSize};
+ CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize ? T_DigestSize : T_StateSize)
unsigned int DigestSize() const {return DIGESTSIZE;};
protected: