summaryrefslogtreecommitdiff
path: root/panama.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 /panama.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 'panama.h')
-rw-r--r--panama.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/panama.h b/panama.h
index ffad8ae..1f24609 100644
--- a/panama.h
+++ b/panama.h
@@ -18,9 +18,9 @@ public:
protected:
typedef word32 Stage[8];
- enum {STAGES = 32};
+ CRYPTOPP_CONSTANT(STAGES = 32)
- FixedSizeSecBlock<word32, 17*2 + STAGES*sizeof(Stage)> m_state;
+ FixedSizeSecBlock<word32, 17*2 + 32*sizeof(Stage)> m_state;
unsigned int m_bstart;
};
@@ -29,7 +29,7 @@ template <class B = LittleEndian>
class PanamaHash : protected Panama<B>, public AlgorithmImpl<IteratedHash<word32, NativeByteOrder, 32>, PanamaHash<B> >
{
public:
- enum {DIGESTSIZE = 32};
+ CRYPTOPP_CONSTANT(DIGESTSIZE = 32)
PanamaHash() {Panama<B>::Reset();}
unsigned int DigestSize() const {return DIGESTSIZE;}
void TruncatedFinal(byte *hash, size_t size);
@@ -43,7 +43,7 @@ protected:
//! MAC construction using a hermetic hash function
template <class T_Hash, class T_Info = T_Hash>
-class HermeticHashFunctionMAC : public AlgorithmImpl<SimpleKeyingInterfaceImpl<TwoBases<MessageAuthenticationCode, VariableKeyLength<32, 0, UINT_MAX> > >, T_Info>
+class HermeticHashFunctionMAC : public AlgorithmImpl<SimpleKeyingInterfaceImpl<TwoBases<MessageAuthenticationCode, VariableKeyLength<32, 0, INT_MAX> > >, T_Info>
{
public:
void UncheckedSetKey(const byte *key, unsigned int length, const NameValuePairs &params)
@@ -127,7 +127,7 @@ protected:
template <class B = LittleEndian>
struct PanamaCipher : public PanamaCipherInfo<B>, public SymmetricCipherDocumentation
{
- typedef SymmetricCipherFinal<ConcretePolicyHolder<PanamaCipherPolicy<B>, AdditiveCipherTemplate<> > > Encryption;
+ typedef SymmetricCipherFinal<ConcretePolicyHolder<PanamaCipherPolicy<B>, AdditiveCipherTemplate<> >, PanamaCipherInfo<B> > Encryption;
typedef Encryption Decryption;
};