aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/passhash
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-01 23:46:07 +0000
committerlloyd <[email protected]>2015-02-01 23:46:07 +0000
commit69d2cd919c698a6b138b2ccba0de5d5aa2a33a03 (patch)
tree1386c3a1524717a21997804a76219093c3790218 /src/lib/passhash
parentfd3016d10124d2b7ccd7bc885235f2e407d73800 (diff)
Add missing files. Remove cipher lookup from engine code.
Diffstat (limited to 'src/lib/passhash')
-rw-r--r--src/lib/passhash/passhash9/passhash9.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/passhash/passhash9/passhash9.cpp b/src/lib/passhash/passhash9/passhash9.cpp
index 2680ac3c4..f11a78dd0 100644
--- a/src/lib/passhash/passhash9/passhash9.cpp
+++ b/src/lib/passhash/passhash9/passhash9.cpp
@@ -7,7 +7,7 @@
#include <botan/passhash9.h>
#include <botan/loadstor.h>
-#include <botan/libstate.h>
+#include <botan/lookup.h>
#include <botan/pbkdf2.h>
#include <botan/base64.h>
@@ -26,20 +26,18 @@ const size_t WORK_FACTOR_SCALE = 10000;
MessageAuthenticationCode* get_pbkdf_prf(byte alg_id)
{
- Algorithm_Factory& af = global_state().algorithm_factory();
-
try
{
if(alg_id == 0)
- return af.make_mac("HMAC(SHA-1)");
+ return get_mac("HMAC(SHA-1)");
else if(alg_id == 1)
- return af.make_mac("HMAC(SHA-256)");
+ return get_mac("HMAC(SHA-256)");
else if(alg_id == 2)
- return af.make_mac("CMAC(Blowfish)");
+ return get_mac("CMAC(Blowfish)");
else if(alg_id == 3)
- return af.make_mac("HMAC(SHA-384)");
+ return get_mac("HMAC(SHA-384)");
else if(alg_id == 4)
- return af.make_mac("HMAC(SHA-512)");
+ return get_mac("HMAC(SHA-512)");
}
catch(Algorithm_Not_Found) {}