diff options
author | lloyd <[email protected]> | 2008-11-08 22:45:28 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-08 22:45:28 +0000 |
commit | dbccddadefdcd9d1f7bd8612d6af4449f4910b1c (patch) | |
tree | 0e3a47f70280df03d7bd3b58eaecea6c07c31155 /src/engine | |
parent | cccd3fafcffa318fa783f857f84b5545028daca2 (diff) |
Remove lookup.h use from ECB, CBC, CFB
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/def_engine/def_mode.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/engine/def_engine/def_mode.cpp b/src/engine/def_engine/def_mode.cpp index 2d4701796..16cbcd57e 100644 --- a/src/engine/def_engine/def_mode.cpp +++ b/src/engine/def_engine/def_mode.cpp @@ -111,9 +111,12 @@ Keyed_Filter* Default_Engine::get_cipher(const std::string& algo_spec, { #if defined(BOTAN_HAS_ECB) if(direction == ENCRYPTION) - return new ECB_Encryption(cipher, padding); + return new ECB_Encryption(get_block_cipher(cipher), + get_bc_pad(padding)); else - return new ECB_Decryption(cipher, padding); + return new ECB_Decryption(get_block_cipher(cipher), + get_bc_pad(padding)); + #else return 0; #endif @@ -122,9 +125,9 @@ Keyed_Filter* Default_Engine::get_cipher(const std::string& algo_spec, { #if defined(BOTAN_HAS_CFB) if(direction == ENCRYPTION) - return new CFB_Encryption(cipher, bits); + return new CFB_Encryption(get_block_cipher(cipher), bits); else - return new CFB_Decryption(cipher, bits); + return new CFB_Decryption(get_block_cipher(cipher), bits); #else return 0; #endif @@ -145,9 +148,11 @@ Keyed_Filter* Default_Engine::get_cipher(const std::string& algo_spec, #if defined(BOTAN_HAS_CBC) if(direction == ENCRYPTION) - return new CBC_Encryption(cipher, padding); + return new CBC_Encryption(get_block_cipher(cipher), + get_bc_pad(padding)); else - return new CBC_Decryption(cipher, padding); + return new CBC_Decryption(get_block_cipher(cipher), + get_bc_pad(padding)); #else return 0; #endif |