aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-12-03 12:36:51 -0500
committerJack Lloyd <[email protected]>2017-12-03 12:36:51 -0500
commit9f6ce97470adad5bf5840f3a569e37f9a01ec831 (patch)
tree3f32a57b91b5e2b70ec6cc30a3119bb3bc7ceed5
parent9787f47772fabf0aec7476c8c2c03307f58d9116 (diff)
Create two macros for CAST-128 vs CAST-256
Since eventually CAST-256 is going away.
-rw-r--r--src/lib/block/block_cipher.cpp9
-rw-r--r--src/lib/block/cast/info.txt2
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 <botan/camellia.h>
#endif
-#if defined(BOTAN_HAS_CAST)
+#if defined(BOTAN_HAS_CAST_128)
#include <botan/cast128.h>
+#endif
+
+#if defined(BOTAN_HAS_CAST_256)
#include <botan/cast256.h>
#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<BlockCipher>(new CAST_128);
}
+#endif
+#if defined(BOTAN_HAS_CAST_256)
if(algo == "CAST-256")
{
return std::unique_ptr<BlockCipher>(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 @@
<defines>
CAST -> 20131128
+CAST_128 -> 20171203
+CAST_256 -> 20171203
</defines>
<header:internal>