From 9f6ce97470adad5bf5840f3a569e37f9a01ec831 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 3 Dec 2017 12:36:51 -0500 Subject: Create two macros for CAST-128 vs CAST-256 Since eventually CAST-256 is going away. --- src/lib/block/block_cipher.cpp | 9 +++++++-- src/lib/block/cast/info.txt | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/lib/block/block_cipher.cpp b/src/lib/block/block_cipher.cpp index a3e17be4c..8be2de664 100644 --- a/src/lib/block/block_cipher.cpp +++ b/src/lib/block/block_cipher.cpp @@ -24,8 +24,11 @@ #include #endif -#if defined(BOTAN_HAS_CAST) +#if defined(BOTAN_HAS_CAST_128) #include +#endif + +#if defined(BOTAN_HAS_CAST_256) #include #endif @@ -229,12 +232,14 @@ BlockCipher::create(const std::string& algo, } #endif -#if defined(BOTAN_HAS_CAST) +#if defined(BOTAN_HAS_CAST_128) if(algo == "CAST-128" || algo == "CAST5") { return std::unique_ptr(new CAST_128); } +#endif +#if defined(BOTAN_HAS_CAST_256) if(algo == "CAST-256") { return std::unique_ptr(new CAST_256); diff --git a/src/lib/block/cast/info.txt b/src/lib/block/cast/info.txt index 75d7e4ca3..3f2749953 100644 --- a/src/lib/block/cast/info.txt +++ b/src/lib/block/cast/info.txt @@ -1,5 +1,7 @@ CAST -> 20131128 +CAST_128 -> 20171203 +CAST_256 -> 20171203 -- cgit v1.2.3