From 78cbd84a0068db09b6d08ff14a316800ad9be89a Mon Sep 17 00:00:00 2001 From: weidai Date: Tue, 15 Apr 2003 00:38:48 +0000 Subject: fix bug in Grouper add RIPEMD-???, Whirlpool, Shacal2, Camellia, Two-Track MAC (Kevin Springle) change ChannelSwitch to allow non-blocking input (denis bider) change Redirector to allow more options (denis bider) fix MaurerRandomnessTest optimize MD2 (Kevin Springle) git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@55 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- md2.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'md2.cpp') diff --git a/md2.cpp b/md2.cpp index aa1a28c..a010dc0 100644 --- a/md2.cpp +++ b/md2.cpp @@ -80,8 +80,17 @@ void MD2::Update(const byte *buf, unsigned int len) t=0; for(i=0; i<18; i++) { - for(j=0; j<48; j++) - t=m_X[j]^=S[t]; + for(j=0; j<48; j+=8) + { + t=m_X[j+0]^=S[t]; + t=m_X[j+1]^=S[t]; + t=m_X[j+2]^=S[t]; + t=m_X[j+3]^=S[t]; + t=m_X[j+4]^=S[t]; + t=m_X[j+5]^=S[t]; + t=m_X[j+6]^=S[t]; + t=m_X[j+7]^=S[t]; + } t=(t+i) & 0xFF; } } -- cgit v1.2.1