diff options
author | lloyd <[email protected]> | 2009-11-03 16:47:11 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-11-03 16:47:11 +0000 |
commit | fa8a8437b9ce3b5275133230708af0964427651a (patch) | |
tree | 1e2565f204d1c6b96f067bb980a98822eebf4465 /src/hash/gost_3411 | |
parent | 6b617a55bd02bcc4fdb6f76af92e0cb65fd838a2 (diff) |
Conver the rest of the hash functions to use the array-based load instructions.
I'm not totally happy with this - in particular in all cases the size is a
compile time constant - it would be nice to make use of this via tempalate
metaprogramming. Also for matching endian loads, a straight memcpy would
do the work, which would probably be even faster.
Diffstat (limited to 'src/hash/gost_3411')
-rw-r--r-- | src/hash/gost_3411/gost_3411.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/hash/gost_3411/gost_3411.cpp b/src/hash/gost_3411/gost_3411.cpp index 90ef3e805..16b1311da 100644 --- a/src/hash/gost_3411/gost_3411.cpp +++ b/src/hash/gost_3411/gost_3411.cpp @@ -79,12 +79,8 @@ void GOST_34_11::compress_n(const byte input[], u32bit blocks) byte S[32] = { 0 }; u64bit U[4], V[4]; - - for(u32bit j = 0; j != 4; ++j) - { - U[j] = load_be<u64bit>(hash, j); - V[j] = load_be<u64bit>(input + 32*i, j); - } + load_be(U, hash, 4); + load_be(V, input + 32*i, 4); for(u32bit j = 0; j != 4; ++j) { |