summaryrefslogtreecommitdiff
path: root/ttmac.h
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-04-16 00:12:03 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2007-04-16 00:12:03 +0000
commit81b06ebbf2c88ada837397d7e01c0088648aa497 (patch)
tree7656fb9e4582f7386a7282efc13919a485fa20b2 /ttmac.h
parente3b2455fd8a84c4dc34767568d2f98dfb088c3af (diff)
downloadcryptopp-81b06ebbf2c88ada837397d7e01c0088648aa497.tar.gz
optimizations
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@293 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'ttmac.h')
-rw-r--r--ttmac.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/ttmac.h b/ttmac.h
index 2e9b262..b4bf86e 100644
--- a/ttmac.h
+++ b/ttmac.h
@@ -15,8 +15,6 @@ public:
static std::string StaticAlgorithmName() {return std::string("Two-Track-MAC");}
CRYPTOPP_CONSTANT(DIGESTSIZE=20)
- TTMAC_Base() {SetStateSize(DIGESTSIZE*2);}
-
unsigned int DigestSize() const {return DIGESTSIZE;};
void UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs &params);
void TruncatedFinal(byte *mac, size_t size);
@@ -25,8 +23,10 @@ protected:
static void Transform (word32 *digest, const word32 *X, bool last);
void HashEndianCorrectedBlock(const word32 *data) {Transform(m_digest, data, false);}
void Init();
+ word32* StateBuf() {return m_digest;}
- FixedSizeSecBlock<word32, DIGESTSIZE> m_key;
+ FixedSizeSecBlock<word32, 10> m_digest;
+ FixedSizeSecBlock<word32, 5> m_key;
};
//! <a href="http://www.weidai.com/scan-mirror/mac.html#TTMAC">Two-Track-MAC</a>