summaryrefslogtreecommitdiff
path: root/md2.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-04-15 00:38:48 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-04-15 00:38:48 +0000
commit78cbd84a0068db09b6d08ff14a316800ad9be89a (patch)
tree2be608b49b99003d7d6f49ac33abd7bbe763d7d9 /md2.cpp
parent0a0244dacface689335de6e0edf978b29ddb66e1 (diff)
downloadcryptopp-78cbd84a0068db09b6d08ff14a316800ad9be89a.tar.gz
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
Diffstat (limited to 'md2.cpp')
-rw-r--r--md2.cpp13
1 files changed, 11 insertions, 2 deletions
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;
}
}