diff options
Diffstat (limited to 'libkeccak_state_initialise.c')
-rw-r--r-- | libkeccak_state_initialise.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libkeccak_state_initialise.c b/libkeccak_state_initialise.c index aa77051..7644ff7 100644 --- a/libkeccak_state_initialise.c +++ b/libkeccak_state_initialise.c @@ -21,9 +21,17 @@ libkeccak_state_initialise(struct libkeccak_state *restrict state, const struct state->w = x = state->b / 25; state->l = 0; - if (x & 0xF0L) state->l |= 4, x >>= 4; - if (x & 0x0CL) state->l |= 2, x >>= 2; - if (x & 0x02L) 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 + (state->l << 1); state->wmod = (state->w == 64) ? ~0LL : (int64_t)((1ULL << state->w) - 1); |