aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/cascade/cascade.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-10-13 02:56:03 +0000
committerlloyd <[email protected]>2010-10-13 02:56:03 +0000
commit3697dcff8b5e9765b41114281ce10e7ed3d3abb4 (patch)
tree670853a74b0fe173e7e9fce9cd3e6eda7a03d2c7 /src/block/cascade/cascade.cpp
parent63121e1e169616f724bf79b8aac1a2b4423c8904 (diff)
s/BLOCK_SIZE/block_size()/
Diffstat (limited to 'src/block/cascade/cascade.cpp')
-rw-r--r--src/block/cascade/cascade.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/block/cascade/cascade.cpp b/src/block/cascade/cascade.cpp
index 54c33bc68..225b7fd6e 100644
--- a/src/block/cascade/cascade.cpp
+++ b/src/block/cascade/cascade.cpp
@@ -12,8 +12,8 @@ namespace Botan {
void Cascade_Cipher::encrypt_n(const byte in[], byte out[],
size_t blocks) const
{
- size_t c1_blocks = blocks * (BLOCK_SIZE / cipher1->BLOCK_SIZE);
- size_t c2_blocks = blocks * (BLOCK_SIZE / cipher2->BLOCK_SIZE);
+ size_t c1_blocks = blocks * (block_size() / cipher1->block_size());
+ size_t c2_blocks = blocks * (block_size() / cipher2->block_size());
cipher1->encrypt_n(in, out, c1_blocks);
cipher2->encrypt_n(out, out, c2_blocks);
@@ -22,8 +22,8 @@ void Cascade_Cipher::encrypt_n(const byte in[], byte out[],
void Cascade_Cipher::decrypt_n(const byte in[], byte out[],
size_t blocks) const
{
- size_t c1_blocks = blocks * (BLOCK_SIZE / cipher1->BLOCK_SIZE);
- size_t c2_blocks = blocks * (BLOCK_SIZE / cipher2->BLOCK_SIZE);
+ size_t c1_blocks = blocks * (block_size() / cipher1->block_size());
+ size_t c2_blocks = blocks * (block_size() / cipher2->block_size());
cipher2->decrypt_n(in, out, c2_blocks);
cipher1->decrypt_n(out, out, c1_blocks);
@@ -81,11 +81,11 @@ size_t block_size_for_cascade(size_t bs, size_t bs2)
}
Cascade_Cipher::Cascade_Cipher(BlockCipher* c1, BlockCipher* c2) :
- BlockCipher(block_size_for_cascade(c1->BLOCK_SIZE, c2->BLOCK_SIZE),
+ BlockCipher(block_size_for_cascade(c1->block_size(), c2->block_size()),
c1->MAXIMUM_KEYLENGTH + c2->MAXIMUM_KEYLENGTH),
cipher1(c1), cipher2(c2)
{
- if(BLOCK_SIZE % c1->BLOCK_SIZE || BLOCK_SIZE % c2->BLOCK_SIZE)
+ if(block_size() % c1->block_size() || block_size() % c2->block_size())
throw Internal_Error("Failure in " + name() + " constructor");
}