Fix CTR mode.
This commit is contained in:
parent
d0aa0817d2
commit
c7752ca73e
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue