diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-04-15 00:38:48 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-04-15 00:38:48 +0000 |
commit | d52b49c51f5c87180cb561b666dd6085556f6c3b (patch) | |
tree | 2be608b49b99003d7d6f49ac33abd7bbe763d7d9 /md2.cpp | |
parent | b4f6ef8e16db0be6ebc3e8aa01bf51ee52082aeb (diff) | |
download | cryptopp-git-d52b49c51f5c87180cb561b666dd6085556f6c3b.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)
Diffstat (limited to 'md2.cpp')
-rw-r--r-- | md2.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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; } } |