diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/block/lion/lion.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/block/lion/lion.cpp b/src/block/lion/lion.cpp index bfff64b67..83c1e3aa3 100644 --- a/src/block/lion/lion.cpp +++ b/src/block/lion/lion.cpp @@ -16,10 +16,10 @@ namespace Botan { */ void Lion::encrypt_n(const byte in[], byte out[], u32bit blocks) const { + SecureVector<byte> buffer(LEFT_SIZE); + for(u32bit i = 0; i != blocks; ++i) { - SecureVector<byte> buffer(LEFT_SIZE); - xor_buf(buffer, in, key1, LEFT_SIZE); cipher->set_key(buffer, LEFT_SIZE); cipher->encrypt(in + LEFT_SIZE, out + LEFT_SIZE, RIGHT_SIZE); @@ -42,10 +42,10 @@ void Lion::encrypt_n(const byte in[], byte out[], u32bit blocks) const */ void Lion::decrypt_n(const byte in[], byte out[], u32bit blocks) const { + SecureVector<byte> buffer(LEFT_SIZE); + for(u32bit i = 0; i != blocks; ++i) { - SecureVector<byte> buffer(LEFT_SIZE); - xor_buf(buffer, in, key2, LEFT_SIZE); cipher->set_key(buffer, LEFT_SIZE); cipher->encrypt(in + LEFT_SIZE, out + LEFT_SIZE, RIGHT_SIZE); |