aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/hash/sha2_32/sha2_32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/hash/sha2_32/sha2_32.cpp')
-rw-r--r--src/lib/hash/sha2_32/sha2_32.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/hash/sha2_32/sha2_32.cpp b/src/lib/hash/sha2_32/sha2_32.cpp
index cffc8bd2a..8e649771f 100644
--- a/src/lib/hash/sha2_32/sha2_32.cpp
+++ b/src/lib/hash/sha2_32/sha2_32.cpp
@@ -171,8 +171,7 @@ void SHA_224::compress_n(const byte input[], size_t blocks)
*/
void SHA_224::copy_out(byte output[])
{
- for(size_t i = 0; i != output_length(); i += 4)
- store_be(digest[i/4], output + i);
+ copy_out_vec_be(output, output_length(), digest);
}
/*
@@ -204,8 +203,7 @@ void SHA_256::compress_n(const byte input[], size_t blocks)
*/
void SHA_256::copy_out(byte output[])
{
- for(size_t i = 0; i != output_length(); i += 4)
- store_be(digest[i/4], output + i);
+ copy_out_vec_be(output, output_length(), digest);
}
/*