aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/passhash
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/passhash')
-rw-r--r--src/lib/passhash/passhash9/passhash9.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/lib/passhash/passhash9/passhash9.cpp b/src/lib/passhash/passhash9/passhash9.cpp
index f11a78dd0..3898cdb44 100644
--- a/src/lib/passhash/passhash9/passhash9.cpp
+++ b/src/lib/passhash/passhash9/passhash9.cpp
@@ -26,21 +26,16 @@ const size_t WORK_FACTOR_SCALE = 10000;
MessageAuthenticationCode* get_pbkdf_prf(byte alg_id)
{
- try
- {
- if(alg_id == 0)
- return get_mac("HMAC(SHA-1)");
- else if(alg_id == 1)
- return get_mac("HMAC(SHA-256)");
- else if(alg_id == 2)
- return get_mac("CMAC(Blowfish)");
- else if(alg_id == 3)
- return get_mac("HMAC(SHA-384)");
- else if(alg_id == 4)
- return get_mac("HMAC(SHA-512)");
- }
- catch(Algorithm_Not_Found) {}
-
+ if(alg_id == 0)
+ return get_mac("HMAC(SHA-1)");
+ else if(alg_id == 1)
+ return get_mac("HMAC(SHA-256)");
+ else if(alg_id == 2)
+ return get_mac("CMAC(Blowfish)");
+ else if(alg_id == 3)
+ return get_mac("HMAC(SHA-384)");
+ else if(alg_id == 4)
+ return get_mac("HMAC(SHA-512)");
return nullptr;
}