summaryrefslogtreecommitdiffstats
path: root/src/blake2s.c
diff options
context:
space:
mode:
authorMatt Dunwoodie <ncon@mail.noconroy.net>2019-08-12 22:58:26 +1000
committerMatt Dunwoodie <ncon@mail.noconroy.net>2019-08-14 00:50:05 +1000
commitd59fb75f24f6242b9ab654156d5d964946d305ea (patch)
tree040509ecfcc09b6e474cd0d26f0e0b35727bce98 /src/blake2s.c
parentMake compilable on octeon (diff)
downloadwireguard-openbsd-d59fb75f24f6242b9ab654156d5d964946d305ea.tar.xz
wireguard-openbsd-d59fb75f24f6242b9ab654156d5d964946d305ea.zip
Fix endianess bugs
Diffstat (limited to 'src/blake2s.c')
-rw-r--r--src/blake2s.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blake2s.c b/src/blake2s.c
index f9f98ea915e..39384b0a7b2 100644
--- a/src/blake2s.c
+++ b/src/blake2s.c
@@ -76,7 +76,7 @@ static inline void blake2s_init_param(struct blake2s_state *state,
memset(state, 0, sizeof(*state));
for (i = 0; i < 8; ++i)
- state->h[i] = blake2s_iv[i] ^ param->words[i];
+ state->h[i] = blake2s_iv[i] ^ le32toh(param->words[i]);
}
void blake2s_init(struct blake2s_state *state, const size_t outlen)