diff options
Diffstat (limited to 'crypto/rc4/rc4.c')
-rw-r--r-- | crypto/rc4/rc4.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/crypto/rc4/rc4.c b/crypto/rc4/rc4.c index 00b59c80..2ebee3b2 100644 --- a/crypto/rc4/rc4.c +++ b/crypto/rc4/rc4.c @@ -285,34 +285,42 @@ void RC4(RC4_KEY *key, size_t len, const uint8_t *in, uint8_t *out) { in += 8; out += 8; #endif - if (--i == 0) + if (--i == 0) { break; + } } } i = len & 0x07; if (i) { for (;;) { RC4_LOOP(in, out, 0); - if (--i == 0) + if (--i == 0) { break; + } RC4_LOOP(in, out, 1); - if (--i == 0) + if (--i == 0) { break; + } RC4_LOOP(in, out, 2); - if (--i == 0) + if (--i == 0) { break; + } RC4_LOOP(in, out, 3); - if (--i == 0) + if (--i == 0) { break; + } RC4_LOOP(in, out, 4); - if (--i == 0) + if (--i == 0) { break; + } RC4_LOOP(in, out, 5); - if (--i == 0) + if (--i == 0) { break; + } RC4_LOOP(in, out, 6); - if (--i == 0) + if (--i == 0) { break; + } } } key->x = x; |