summaryrefslogtreecommitdiff
path: root/lubyrack.h
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2006-12-14 11:41:39 +0000
committerweidai <weidai11@users.noreply.github.com>2006-12-14 11:41:39 +0000
commit4afd858ae4974f82f9997b9184bc3d8d71d29b6e (patch)
treebe3960f1424e79719ea9c5f6152df003bc1c44f3 /lubyrack.h
parent0f5ff1a06380139d0e93ba7cda3923d2c41cd866 (diff)
downloadcryptopp-git-4afd858ae4974f82f9997b9184bc3d8d71d29b6e.tar.gz
port to Borland C++Builder 2006
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 af3a77ba..e8fd2f74 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;