aboutsummaryrefslogtreecommitdiffstats
path: root/src/block/des
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/des
parent63121e1e169616f724bf79b8aac1a2b4423c8904 (diff)
s/BLOCK_SIZE/block_size()/
Diffstat (limited to 'src/block/des')
-rw-r--r--src/block/des/des.cpp16
-rw-r--r--src/block/des/desx.cpp16
2 files changed, 16 insertions, 16 deletions
diff --git a/src/block/des/des.cpp b/src/block/des/des.cpp
index 15c771bda..7c61df3db 100644
--- a/src/block/des/des.cpp
+++ b/src/block/des/des.cpp
@@ -162,8 +162,8 @@ void DES::encrypt_n(const byte in[], byte out[], size_t blocks) const
store_be(T, out);
- in += BLOCK_SIZE;
- out += BLOCK_SIZE;
+ in += block_size();
+ out += block_size();
}
}
@@ -193,8 +193,8 @@ void DES::decrypt_n(const byte in[], byte out[], size_t blocks) const
store_be(T, out);
- in += BLOCK_SIZE;
- out += BLOCK_SIZE;
+ in += block_size();
+ out += block_size();
}
}
@@ -234,8 +234,8 @@ void TripleDES::encrypt_n(const byte in[], byte out[], size_t blocks) const
store_be(T, out);
- in += BLOCK_SIZE;
- out += BLOCK_SIZE;
+ in += block_size();
+ out += block_size();
}
}
@@ -267,8 +267,8 @@ void TripleDES::decrypt_n(const byte in[], byte out[], size_t blocks) const
store_be(T, out);
- in += BLOCK_SIZE;
- out += BLOCK_SIZE;
+ in += block_size();
+ out += block_size();
}
}
diff --git a/src/block/des/desx.cpp b/src/block/des/desx.cpp
index b92011e56..c4dacdfdd 100644
--- a/src/block/des/desx.cpp
+++ b/src/block/des/desx.cpp
@@ -17,12 +17,12 @@ void DESX::encrypt_n(const byte in[], byte out[], size_t blocks) const
{
for(size_t i = 0; i != blocks; ++i)
{
- xor_buf(out, in, &K1[0], BLOCK_SIZE);
+ xor_buf(out, in, &K1[0], block_size());
des.encrypt(out);
- xor_buf(out, &K2[0], BLOCK_SIZE);
+ xor_buf(out, &K2[0], block_size());
- in += BLOCK_SIZE;
- out += BLOCK_SIZE;
+ in += block_size();
+ out += block_size();
}
}
@@ -33,12 +33,12 @@ void DESX::decrypt_n(const byte in[], byte out[], size_t blocks) const
{
for(size_t i = 0; i != blocks; ++i)
{
- xor_buf(out, in, &K2[0], BLOCK_SIZE);
+ xor_buf(out, in, &K2[0], block_size());
des.decrypt(out);
- xor_buf(out, &K1[0], BLOCK_SIZE);
+ xor_buf(out, &K1[0], block_size());
- in += BLOCK_SIZE;
- out += BLOCK_SIZE;
+ in += block_size();
+ out += block_size();
}
}