summaryrefslogtreecommitdiff
path: root/lubyrack.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 /lubyrack.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 'lubyrack.h')
-rw-r--r--lubyrack.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lubyrack.h b/lubyrack.h
index af3a77b..e8fd2f7 100644
--- a/lubyrack.h
+++ b/lubyrack.h
@@ -10,11 +10,14 @@
NAMESPACE_BEGIN(CryptoPP)
-template <class T> struct DigestSizeDoubleWorkaround {enum {RESULT = 2*T::DIGESTSIZE};}; // VC60 workaround
+template <class T> struct DigestSizeDoubleWorkaround // VC60 workaround
+{
+ CRYPTOPP_CONSTANT(RESULT = 2*T::DIGESTSIZE)
+};
//! algorithm info
template <class T>
-struct LR_Info : public VariableKeyLength<16, 0, 2*(UINT_MAX/2), 2>, public FixedBlockSize<DigestSizeDoubleWorkaround<T>::RESULT>
+struct LR_Info : public VariableKeyLength<16, 0, 2*(INT_MAX/2), 2>, public FixedBlockSize<DigestSizeDoubleWorkaround<T>::RESULT>
{
static std::string StaticAlgorithmName() {return std::string("LR/")+T::StaticAlgorithmName();}
};
@@ -38,7 +41,7 @@ class LR : public LR_Info<T>, public BlockCipherDocumentation
}
protected:
- enum {S=T::DIGESTSIZE};
+ CRYPTOPP_CONSTANT(S=T::DIGESTSIZE)
unsigned int L; // key length / 2
SecByteBlock key;