aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-27 04:38:07 +0000
committerlloyd <[email protected]>2009-12-27 04:38:07 +0000
commitf4072f413e8121e633d6882d439b2b249a535230 (patch)
tree623e47d8f85b8515ba8b01f56b63242909290e9e
parentc38ac6ce9a7bf6b42b7a28c49afdd04a9aaa7160 (diff)
buffered_proc_block is a mouthful
-rw-r--r--src/filters/modes/cbc/cbc.cpp16
-rw-r--r--src/filters/modes/cbc/cbc.h4
-rw-r--r--src/filters/modes/xts/xts.cpp16
-rw-r--r--src/filters/modes/xts/xts.h4
4 files changed, 20 insertions, 20 deletions
diff --git a/src/filters/modes/cbc/cbc.cpp b/src/filters/modes/cbc/cbc.cpp
index 2a339554e..299db1c37 100644
--- a/src/filters/modes/cbc/cbc.cpp
+++ b/src/filters/modes/cbc/cbc.cpp
@@ -19,7 +19,7 @@ namespace Botan {
CBC_Encryption::CBC_Encryption(BlockCipher* ciph,
BlockCipherModePaddingMethod* pad) :
cipher(ciph), padder(pad),
- buf_op(std::tr1::bind(&CBC_Encryption::buffered_proc_block, this, _1, _2),
+ buf_op(std::tr1::bind(&CBC_Encryption::buffered_block, this, _1, _2),
std::tr1::bind(&CBC_Encryption::buffered_final, this, _1, _2),
2 * cipher->BLOCK_SIZE)
{
@@ -37,7 +37,7 @@ CBC_Encryption::CBC_Encryption(BlockCipher* ciph,
const SymmetricKey& key,
const InitializationVector& iv) :
cipher(ciph), padder(pad),
- buf_op(std::tr1::bind(&CBC_Encryption::buffered_proc_block, this, _1, _2),
+ buf_op(std::tr1::bind(&CBC_Encryption::buffered_block, this, _1, _2),
std::tr1::bind(&CBC_Encryption::buffered_final, this, _1, _2),
2 * cipher->BLOCK_SIZE)
{
@@ -65,7 +65,7 @@ void CBC_Encryption::set_iv(const InitializationVector& iv)
/*
* Encrypt in CBC mode
*/
-void CBC_Encryption::buffered_proc_block(const byte input[], u32bit length)
+void CBC_Encryption::buffered_block(const byte input[], u32bit length)
{
u32bit blocks = length / state.size();
@@ -83,7 +83,7 @@ void CBC_Encryption::buffered_proc_block(const byte input[], u32bit length)
void CBC_Encryption::buffered_final(const byte input[], u32bit length)
{
if(length % cipher->BLOCK_SIZE == 0)
- buffered_proc_block(input, length);
+ buffered_block(input, length);
else if(length != 0)
throw Exception(name() + ": Did not pad to full blocksize");
}
@@ -120,7 +120,7 @@ std::string CBC_Encryption::name() const
CBC_Decryption::CBC_Decryption(BlockCipher* ciph,
BlockCipherModePaddingMethod* pad) :
cipher(ciph), padder(pad),
- buf_op(std::tr1::bind(&CBC_Decryption::buffered_proc_block, this, _1, _2),
+ buf_op(std::tr1::bind(&CBC_Decryption::buffered_block, this, _1, _2),
std::tr1::bind(&CBC_Decryption::buffered_final, this, _1, _2),
BOTAN_PARALLEL_BLOCKS_CBC * cipher->BLOCK_SIZE,
cipher->BLOCK_SIZE)
@@ -140,7 +140,7 @@ CBC_Decryption::CBC_Decryption(BlockCipher* ciph,
const SymmetricKey& key,
const InitializationVector& iv) :
cipher(ciph), padder(pad),
- buf_op(std::tr1::bind(&CBC_Decryption::buffered_proc_block, this, _1, _2),
+ buf_op(std::tr1::bind(&CBC_Decryption::buffered_block, this, _1, _2),
std::tr1::bind(&CBC_Decryption::buffered_final, this, _1, _2),
BOTAN_PARALLEL_BLOCKS_CBC * cipher->BLOCK_SIZE,
cipher->BLOCK_SIZE)
@@ -170,7 +170,7 @@ void CBC_Decryption::set_iv(const InitializationVector& iv)
/*
* Decrypt in CBC mode
*/
-void CBC_Decryption::buffered_proc_block(const byte input[], u32bit length)
+void CBC_Decryption::buffered_block(const byte input[], u32bit length)
{
const u32bit blocks_in_temp = temp.size() / cipher->BLOCK_SIZE;
u32bit blocks = length / cipher->BLOCK_SIZE;
@@ -207,7 +207,7 @@ void CBC_Decryption::buffered_final(const byte input[], u32bit length)
size_t extra_blocks = (length - 1) / cipher->BLOCK_SIZE;
- buffered_proc_block(input, extra_blocks * cipher->BLOCK_SIZE);
+ buffered_block(input, extra_blocks * cipher->BLOCK_SIZE);
input += extra_blocks * cipher->BLOCK_SIZE;
diff --git a/src/filters/modes/cbc/cbc.h b/src/filters/modes/cbc/cbc.h
index f5c4e280c..9faf35605 100644
--- a/src/filters/modes/cbc/cbc.h
+++ b/src/filters/modes/cbc/cbc.h
@@ -40,7 +40,7 @@ class BOTAN_DLL CBC_Encryption : public Keyed_Filter
~CBC_Encryption() { delete padder; }
private:
- void buffered_proc_block(const byte input[], u32bit input_length);
+ void buffered_block(const byte input[], u32bit input_length);
void buffered_final(const byte input[], u32bit input_length);
void write(const byte input[], u32bit input_length);
@@ -77,7 +77,7 @@ class BOTAN_DLL CBC_Decryption : public Keyed_Filter
~CBC_Decryption() { delete padder; }
private:
- void buffered_proc_block(const byte input[], u32bit input_length);
+ void buffered_block(const byte input[], u32bit input_length);
void buffered_final(const byte input[], u32bit input_length);
void write(const byte[], u32bit);
diff --git a/src/filters/modes/xts/xts.cpp b/src/filters/modes/xts/xts.cpp
index 265440e65..09614d0b4 100644
--- a/src/filters/modes/xts/xts.cpp
+++ b/src/filters/modes/xts/xts.cpp
@@ -41,7 +41,7 @@ void poly_double(byte tweak[], u32bit size)
*/
XTS_Encryption::XTS_Encryption(BlockCipher* ciph) :
cipher(ciph),
- buf_op(std::tr1::bind(&XTS_Encryption::buffered_proc_block, this, _1, _2),
+ buf_op(std::tr1::bind(&XTS_Encryption::buffered_block, this, _1, _2),
std::tr1::bind(&XTS_Encryption::buffered_final, this, _1, _2),
2 * cipher->BLOCK_SIZE, cipher->BLOCK_SIZE + 1)
{
@@ -59,7 +59,7 @@ XTS_Encryption::XTS_Encryption(BlockCipher* ciph,
const SymmetricKey& key,
const InitializationVector& iv) :
cipher(ciph),
- buf_op(std::tr1::bind(&XTS_Encryption::buffered_proc_block, this, _1, _2),
+ buf_op(std::tr1::bind(&XTS_Encryption::buffered_block, this, _1, _2),
std::tr1::bind(&XTS_Encryption::buffered_final, this, _1, _2),
2 * cipher->BLOCK_SIZE, cipher->BLOCK_SIZE + 1)
{
@@ -130,7 +130,7 @@ void XTS_Encryption::end_msg()
buf_op.final();
}
-void XTS_Encryption::buffered_proc_block(const byte input[], u32bit length)
+void XTS_Encryption::buffered_block(const byte input[], u32bit length)
{
const u32bit blocks_in_tweak = tweak.size() / cipher->BLOCK_SIZE;
u32bit blocks = length / cipher->BLOCK_SIZE;
@@ -178,7 +178,7 @@ void XTS_Encryption::buffered_final(const byte input[], u32bit length)
if(length % cipher->BLOCK_SIZE == 0)
{
- buffered_proc_block(input, length);
+ buffered_block(input, length);
}
else
{ // steal ciphertext
@@ -207,7 +207,7 @@ void XTS_Encryption::buffered_final(const byte input[], u32bit length)
* XTS_Decryption constructor
*/
XTS_Decryption::XTS_Decryption(BlockCipher* ciph) :
- buf_op(std::tr1::bind(&XTS_Decryption::buffered_proc_block, this, _1, _2),
+ buf_op(std::tr1::bind(&XTS_Decryption::buffered_block, this, _1, _2),
std::tr1::bind(&XTS_Decryption::buffered_final, this, _1, _2),
2 * ciph->BLOCK_SIZE, 1)
{
@@ -222,7 +222,7 @@ XTS_Decryption::XTS_Decryption(BlockCipher* ciph) :
XTS_Decryption::XTS_Decryption(BlockCipher* ciph,
const SymmetricKey& key,
const InitializationVector& iv) :
- buf_op(std::tr1::bind(&XTS_Decryption::buffered_proc_block, this, _1, _2),
+ buf_op(std::tr1::bind(&XTS_Decryption::buffered_block, this, _1, _2),
std::tr1::bind(&XTS_Decryption::buffered_final, this, _1, _2),
2 * ciph->BLOCK_SIZE, 1)
{
@@ -292,7 +292,7 @@ void XTS_Decryption::end_msg()
buf_op.final();
}
-void XTS_Decryption::buffered_proc_block(const byte input[], u32bit input_length)
+void XTS_Decryption::buffered_block(const byte input[], u32bit input_length)
{
const u32bit blocks_in_tweak = tweak.size() / cipher->BLOCK_SIZE;
u32bit blocks = input_length / cipher->BLOCK_SIZE;
@@ -337,7 +337,7 @@ void XTS_Decryption::buffered_final(const byte input[], u32bit input_length)
if(input_length % cipher->BLOCK_SIZE == 0)
{
- buffered_proc_block(input, input_length);
+ buffered_block(input, input_length);
}
else
{
diff --git a/src/filters/modes/xts/xts.h b/src/filters/modes/xts/xts.h
index b382e1abb..bf580c44d 100644
--- a/src/filters/modes/xts/xts.h
+++ b/src/filters/modes/xts/xts.h
@@ -39,7 +39,7 @@ class BOTAN_DLL XTS_Encryption : public Keyed_Filter
void write(const byte[], u32bit);
void end_msg();
- void buffered_proc_block(const byte input[], u32bit input_length);
+ void buffered_block(const byte input[], u32bit input_length);
void buffered_final(const byte input[], u32bit input_length);
BlockCipher* cipher;
@@ -72,7 +72,7 @@ class BOTAN_DLL XTS_Decryption : public Keyed_Filter
void write(const byte[], u32bit);
void end_msg();
- void buffered_proc_block(const byte input[], u32bit input_length);
+ void buffered_block(const byte input[], u32bit input_length);
void buffered_final(const byte input[], u32bit input_length);
BlockCipher* cipher;