From 25a333a83244dd7d1c6e3aa8ff298f2efc35c784 Mon Sep 17 00:00:00 2001 From: weidai Date: Thu, 31 Jul 2003 01:52:57 +0000 Subject: fix BTEA --- tea.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tea.h b/tea.h index 898f7de6..ed7687e4 100644 --- a/tea.h +++ b/tea.h @@ -87,7 +87,8 @@ struct BTEA_Info : public FixedKeyLength<16> static const char *StaticAlgorithmName() {return "BTEA";} }; -/// corrected Block TEA (as described in "xxtea"). +//! corrected Block TEA (as described in "xxtea"). +/*! This class hasn't been tested yet. */ class BTEA : public BTEA_Info, public BlockCipherDocumentation { class CRYPTOPP_NO_VTABLE Base : public AlgorithmImpl, BTEA_Info>, public BTEA_Info @@ -97,8 +98,8 @@ class BTEA : public BTEA_Info, public BlockCipherDocumentation static inline void CheckedSetKey(T *obj, CipherDir dir, const byte *key, unsigned int length, const NameValuePairs ¶m) { obj->ThrowIfInvalidKeyLength(length); - m_blockSize = param.GetIntValueWithDefault("BlockSize", 60*4); - GetUserKey(BIG_ENDIAN_ORDER, m_k.begin(), 4, userKey, KEYLENGTH); + obj->m_blockSize = param.GetIntValueWithDefault("BlockSize", 60*4); + GetUserKey(BIG_ENDIAN_ORDER, obj->m_k.begin(), 4, userKey, KEYLENGTH); } unsigned int BlockSize() const {return m_blockSize;} -- cgit v1.2.1