diff options
author | lloyd <[email protected]> | 2015-03-23 02:18:09 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2015-03-23 02:18:09 +0000 |
commit | cd5ae5dae47241275477f63f1941bd233f861339 (patch) | |
tree | 16d9648e317458822725ef95f326fdf2d4ff6924 /src/lib/passhash | |
parent | 2d5669770a5723d258703384f905e1d13d6b8696 (diff) |
Cleanups
Diffstat (limited to 'src/lib/passhash')
-rw-r--r-- | src/lib/passhash/passhash9/passhash9.cpp | 25 |
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; } |