aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/block/block_cipher.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/block/block_cipher.h b/src/lib/block/block_cipher.h
index f8c6e47b8..9961182fa 100644
--- a/src/lib/block/block_cipher.h
+++ b/src/lib/block/block_cipher.h
@@ -174,7 +174,7 @@ class BOTAN_PUBLIC_API(2,0) BlockCipher : public SymmetricAlgorithm
{
const size_t BS = block_size();
xor_buf(data, mask, blocks * BS);
- decrypt_n(data, data, blocks);
+ encrypt_n(data, data, blocks);
xor_buf(data, mask, blocks * BS);
}
@@ -184,7 +184,7 @@ class BOTAN_PUBLIC_API(2,0) BlockCipher : public SymmetricAlgorithm
{
const size_t BS = block_size();
xor_buf(data, mask, blocks * BS);
- encrypt_n(data, data, blocks);
+ decrypt_n(data, data, blocks);
xor_buf(data, mask, blocks * BS);
}