summaryrefslogtreecommitdiff
path: root/whrlpool.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-09-05 20:29:39 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-09-05 20:29:39 +0000
commitb26f231cec32a485df31cdc223fe254d08554bda (patch)
treef2dc0c8f0d2f62a41052a42be7b2d9fd39e5fcd3 /whrlpool.cpp
parentdd2126c07636a38e18dae6f15670417cad7d4ccf (diff)
downloadcryptopp-b26f231cec32a485df31cdc223fe254d08554bda.tar.gz
use memset instead of assignment to clear memory
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@132 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'whrlpool.cpp')
-rw-r--r--whrlpool.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/whrlpool.cpp b/whrlpool.cpp
index f2462f2..7f3195b 100644
--- a/whrlpool.cpp
+++ b/whrlpool.cpp
@@ -64,8 +64,7 @@ void Whirlpool_TestInstantiations()
void Whirlpool::InitState(HashWordType *state)
{
- state[0] = state[1] = state[2] = state[3] =
- state[4] = state[5] = state[6] = state[7] = 0;
+ memset(state, 0, 8*sizeof(state[0]));
}
void Whirlpool::TruncatedFinal(byte *hash, unsigned int size)