From c7752ca73e582d63412e7f40984cff2fca02c22f Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 30 Aug 2013 13:43:23 +0200 Subject: [PATCH] Fix CTR mode. --- src/openssl/cipher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openssl/cipher.c b/src/openssl/cipher.c index c0307f82..5d9bebcd 100644 --- a/src/openssl/cipher.c +++ b/src/openssl/cipher.c @@ -171,7 +171,7 @@ bool cipher_counter_xor(cipher_t *cipher, const void *indata, size_t inlen, void break; } - *out++ = *in++ ^ cipher->counter->counter[cipher->counter->n++]; + *out++ = *in++ ^ cipher->counter->block[cipher->counter->n++]; if(cipher->counter->n >= cipher->cipher->block_size) cipher->counter->n = 0; -- 2.20.1