From ac6beb56fec6c59b0374d14f4c11241c1950ba19 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 4 Nov 2014 14:25:13 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/libkeccak/state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libkeccak/state.c b/src/libkeccak/state.c index 0502073..31b5b7b 100644 --- a/src/libkeccak/state.c +++ b/src/libkeccak/state.c @@ -38,9 +38,9 @@ int libkeccak_state_initialise(libkeccak_state_t* restrict state, const libkecca state->b = r + c; state->w = x = b / 25; state->l = 0; - if ((x & 0x00F0) != 0) state->l |= 4, x >>= 4; - if ((x & 0x000C) != 0) state->l |= 2, x >>= 2; - if ((x & 0x0002) != 0) state->l |= 1; + if (x & 0xF0L) state->l |= 4, x >>= 4; + if (x & 0x0CL) state->l |= 2, x >>= 2; + if (x & 0x02L) state->l |= 1; state->nr = 12 + (l << 1); state->wmod = (state->w == 64) ? ~0LL : ((1LL << w) - 1); for (x = 0; x < 25; x++) -- cgit v1.2.3-70-g09d2