aboutsummaryrefslogtreecommitdiffstats
path: root/src/md5.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/md5.cpp')
-rw-r--r--src/md5.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/md5.cpp b/src/md5.cpp
index 51cd7fe82..ec3703de5 100644
--- a/src/md5.cpp
+++ b/src/md5.cpp
@@ -58,7 +58,7 @@ inline void II(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
void MD5::hash(const byte input[])
{
for(u32bit j = 0; j != 16; ++j)
- M[j] = make_u32bit(input[4*j+3], input[4*j+2], input[4*j+1], input[4*j]);
+ M[j] = load_le<u32bit>(input, j);
u32bit A = digest[0], B = digest[1], C = digest[2], D = digest[3];
@@ -106,8 +106,8 @@ void MD5::hash(const byte input[])
*************************************************/
void MD5::copy_out(byte output[])
{
- for(u32bit j = 0; j != OUTPUT_LENGTH; ++j)
- output[j] = get_byte(3 - (j % 4), digest[j/4]);
+ for(u32bit j = 0; j != OUTPUT_LENGTH; j += 4)
+ store_le(digest[j/4], output + j);
}
/*************************************************