diff options
author | lloyd <[email protected]> | 2010-03-01 17:25:24 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-03-01 17:25:24 +0000 |
commit | bf916c91511b913ea0954cd05aab07dc65cb9b13 (patch) | |
tree | 2df7b7688d90a0ca32462db5396875f2acbccf20 /src/constructs/passhash | |
parent | af752a4fb655723d6bda88278d258d893c9dac5e (diff) |
In get_pbkdf_prf, catch Algorithm_Not_Found and return null
Diffstat (limited to 'src/constructs/passhash')
-rw-r--r-- | src/constructs/passhash/passhash9.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/constructs/passhash/passhash9.cpp b/src/constructs/passhash/passhash9.cpp index b869e2812..d6477de63 100644 --- a/src/constructs/passhash/passhash9.cpp +++ b/src/constructs/passhash/passhash9.cpp @@ -29,8 +29,16 @@ MessageAuthenticationCode* get_pbkdf_prf(byte alg_id) { Algorithm_Factory& af = global_state().algorithm_factory(); - if(alg_id == 0) - return af.make_mac("HMAC(SHA-1)"); + try + { + if(alg_id == 0) + return af.make_mac("HMAC(SHA-1)"); + + } + catch(Algorithm_Not_Found) + { + return 0; + } return 0; } |