Commit a88b7c4f authored by Niels Möller's avatar Niels Möller
Browse files

* cbc.c (cbc_encrypt): Bug fix, encrypt block *after* XOR:ing the

iv.

Rev: src/nettle/cbc.c:1.4
parent 18eaed2f
......@@ -44,7 +44,7 @@ cbc_encrypt(void *ctx, void (*f)(void *ctx,
for ( ; length; length -= block_size, src += block_size, dst += block_size)
{
memxor(iv, src, block_size);
f(ctx, block_size, dst, src);
f(ctx, block_size, dst, iv);
memcpy(iv, dst, block_size);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment