aboutsummaryrefslogtreecommitdiffstats
path: root/src/modes/cbc/cbc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modes/cbc/cbc.cpp')
-rw-r--r--src/modes/cbc/cbc.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modes/cbc/cbc.cpp b/src/modes/cbc/cbc.cpp
index 9ad598bed..eea039ce3 100644
--- a/src/modes/cbc/cbc.cpp
+++ b/src/modes/cbc/cbc.cpp
@@ -15,7 +15,8 @@ namespace Botan {
*************************************************/
CBC_Encryption::CBC_Encryption(const std::string& cipher_name,
const std::string& padding_name) :
- BlockCipherMode(cipher_name, "CBC", block_size_of(cipher_name)),
+ BlockCipherMode(get_block_cipher(cipher_name),
+ "CBC", block_size_of(cipher_name)),
padder(get_bc_pad(padding_name))
{
if(!padder->valid_blocksize(BLOCK_SIZE))
@@ -29,7 +30,8 @@ CBC_Encryption::CBC_Encryption(const std::string& cipher_name,
const std::string& padding_name,
const SymmetricKey& key,
const InitializationVector& iv) :
- BlockCipherMode(cipher_name, "CBC", block_size_of(cipher_name)),
+ BlockCipherMode(get_block_cipher(cipher_name),
+ "CBC", block_size_of(cipher_name)),
padder(get_bc_pad(padding_name))
{
if(!padder->valid_blocksize(BLOCK_SIZE))
@@ -84,7 +86,8 @@ std::string CBC_Encryption::name() const
*************************************************/
CBC_Decryption::CBC_Decryption(const std::string& cipher_name,
const std::string& padding_name) :
- BlockCipherMode(cipher_name, "CBC", block_size_of(cipher_name)),
+ BlockCipherMode(get_block_cipher(cipher_name),
+ "CBC", block_size_of(cipher_name)),
padder(get_bc_pad(padding_name))
{
if(!padder->valid_blocksize(BLOCK_SIZE))
@@ -99,7 +102,8 @@ CBC_Decryption::CBC_Decryption(const std::string& cipher_name,
const std::string& padding_name,
const SymmetricKey& key,
const InitializationVector& iv) :
- BlockCipherMode(cipher_name, "CBC", block_size_of(cipher_name)),
+ BlockCipherMode(get_block_cipher(cipher_name),
+ "CBC", block_size_of(cipher_name)),
padder(get_bc_pad(padding_name))
{
if(!padder->valid_blocksize(BLOCK_SIZE))