diff options
author | lloyd <[email protected]> | 2008-11-08 21:15:21 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-11-08 21:15:21 +0000 |
commit | 86221e5f9b501eaf9c5370f158432d34cc713110 (patch) | |
tree | 965f4e4b7efe09fbf0cf78787e43796c7993a02f /src/engine/def_engine/lookup_s2k.cpp | |
parent | 62c6b4cc270a6fe4afc329d4405ceeb865fb81a5 (diff) |
Invoke HMAC constructor directly for PBKDF2 since it is hardcoded anyway
Diffstat (limited to 'src/engine/def_engine/lookup_s2k.cpp')
-rw-r--r-- | src/engine/def_engine/lookup_s2k.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine/def_engine/lookup_s2k.cpp b/src/engine/def_engine/lookup_s2k.cpp index 91e986abc..68a259273 100644 --- a/src/engine/def_engine/lookup_s2k.cpp +++ b/src/engine/def_engine/lookup_s2k.cpp @@ -14,6 +14,7 @@ #if defined(BOTAN_HAS_PBKDF2) #include <botan/pbkdf2.h> + #include <botan/hmac.h> #endif #if defined(BOTAN_HAS_PGPS2K) @@ -46,7 +47,7 @@ S2K* Default_Engine::find_s2k(const std::string& algo_spec) const if(algo_name == "PBKDF2") { if(name.size() == 2) - return new PKCS5_PBKDF2(get_mac("HMAC(" + name[1] + ")")); + return new PKCS5_PBKDF2(new HMAC(get_hash(name[1]))); throw Invalid_Algorithm_Name(algo_spec); } #endif |