aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-30 18:42:42 +0000
committerlloyd <[email protected]>2010-09-30 18:42:42 +0000
commit63bc6e8971f66233f4e05bb8d7f7db9afd7ba7f4 (patch)
tree0dcb7fa1934bf1e84f1567f80a926ecfe7d9a1b6 /src/engine
parentd45c828067598fc44eff08333c23af413ab2a455 (diff)
Split SHA-2 into 32 and 64 bit versions; they are totally independent
of each other anyway.
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/core_engine/lookup_hash.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/engine/core_engine/lookup_hash.cpp b/src/engine/core_engine/lookup_hash.cpp
index 1524015dd..705b16b87 100644
--- a/src/engine/core_engine/lookup_hash.cpp
+++ b/src/engine/core_engine/lookup_hash.cpp
@@ -58,8 +58,10 @@
#include <botan/sha160.h>
#endif
-#if defined(BOTAN_HAS_SHA2)
+#if defined(BOTAN_HAS_SHA2_32)
#include <botan/sha2_32.h>
+
+#if defined(BOTAN_HAS_SHA2_64)
#include <botan/sha2_64.h>
#endif
@@ -151,11 +153,14 @@ HashFunction* Core_Engine::find_hash(const SCAN_Name& request,
return new SHA_160;
#endif
-#if defined(BOTAN_HAS_SHA2)
+#if defined(BOTAN_HAS_SHA2_32)
if(request.algo_name() == "SHA-224")
return new SHA_224;
if(request.algo_name() == "SHA-256")
return new SHA_256;
+#endif
+
+#if defined(BOTAN_HAS_SHA2_64)
if(request.algo_name() == "SHA-384")
return new SHA_384;
if(request.algo_name() == "SHA-512")