diff options
Diffstat (limited to 'src/engine/def_engine')
-rw-r--r-- | src/engine/def_engine/lookup_block.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/engine/def_engine/lookup_block.cpp b/src/engine/def_engine/lookup_block.cpp index cdad76c46..097a471b7 100644 --- a/src/engine/def_engine/lookup_block.cpp +++ b/src/engine/def_engine/lookup_block.cpp @@ -22,6 +22,10 @@ #include <botan/cast256.h> #endif +#if defined(BOTAN_HAS_CASCADE) + #include <botan/cascade.h> +#endif + #if defined(BOTAN_HAS_DES) #include <botan/des.h> #include <botan/desx.h> @@ -240,6 +244,17 @@ Default_Engine::find_block_cipher(const SCAN_Name& request, } #endif +#if defined(BOTAN_HAS_CASCADE) + if(request.algo_name() == "Cascade" && request.arg_count() == 2) + { + const BlockCipher* c1 = af.prototype_block_cipher(request.arg(0)); + const BlockCipher* c2 = af.prototype_block_cipher(request.arg(1)); + + if(c1 && c2) + return new Cascade_Cipher(c1->clone(), c2->clone()); + } +#endif + #if defined(BOTAN_HAS_LION) if(request.algo_name() == "Lion" && request.arg_count_between(2, 3)) { |