diff options
author | lloyd <[email protected]> | 2008-09-28 18:19:22 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-28 18:19:22 +0000 |
commit | 9caed38cf07ae1cb6fcb4e21c600818a48bf313e (patch) | |
tree | 388d4c2ed79f8dc5580c41f4e474ee7517121a25 | |
parent | 983a8ecb42e844f89466d0ae52bba591d4fc4275 (diff) |
Modularize CMAC and HMAC
-rw-r--r-- | modules/mac/cmac/cmac.cpp (renamed from src/cmac.cpp) | 0 | ||||
-rw-r--r-- | modules/mac/cmac/cmac.h (renamed from include/cmac.h) | 0 | ||||
-rw-r--r-- | modules/mac/hmac/hmac.cpp (renamed from src/hmac.cpp) | 0 | ||||
-rw-r--r-- | modules/mac/hmac/hmac.h (renamed from include/hmac.h) | 0 | ||||
-rw-r--r-- | src/def_alg.cpp | 15 |
5 files changed, 13 insertions, 2 deletions
diff --git a/src/cmac.cpp b/modules/mac/cmac/cmac.cpp index 5a99f93b1..5a99f93b1 100644 --- a/src/cmac.cpp +++ b/modules/mac/cmac/cmac.cpp diff --git a/include/cmac.h b/modules/mac/cmac/cmac.h index c7f107258..c7f107258 100644 --- a/include/cmac.h +++ b/modules/mac/cmac/cmac.h diff --git a/src/hmac.cpp b/modules/mac/hmac/hmac.cpp index b8c76e8f6..b8c76e8f6 100644 --- a/src/hmac.cpp +++ b/modules/mac/hmac/hmac.cpp diff --git a/include/hmac.h b/modules/mac/hmac/hmac.h index 62529cf13..62529cf13 100644 --- a/include/hmac.h +++ b/modules/mac/hmac/hmac.h diff --git a/src/def_alg.cpp b/src/def_alg.cpp index ad7ddae70..285cca8f2 100644 --- a/src/def_alg.cpp +++ b/src/def_alg.cpp @@ -7,8 +7,6 @@ #include <botan/libstate.h> #include <botan/parsing.h> -#include <botan/cmac.h> -#include <botan/hmac.h> #include <botan/par_hash.h> #include <botan/mode_pad.h> @@ -182,6 +180,14 @@ #include <botan/cbc_mac.h> #endif +#ifdef BOTAN_HAS_CMAC + #include <botan/cmac.h> +#endif + +#ifdef BOTAN_HAS_HMAC + #include <botan/hmac.h> +#endif + #ifdef BOTAN_HAS_SSL3_MAC #include <botan/ssl3_mac.h> #endif @@ -493,8 +499,13 @@ Default_Engine::find_mac(const std::string& algo_spec) const HANDLE_TYPE_ONE_STRING("CBC-MAC", CBC_MAC); #endif +#ifdef BOTAN_HAS_CMAC HANDLE_TYPE_ONE_STRING("CMAC", CMAC); +#endif + +#ifdef BOTAN_HAS_HMAC HANDLE_TYPE_ONE_STRING("HMAC", HMAC); +#endif #ifdef BOTAN_HAS_SSL3_MAC HANDLE_TYPE_ONE_STRING("SSL3-MAC", SSL3_MAC); |