Improvements #9107
openNew overloaded C'tor for Wt::Auth::PasswordVerifier
0%
Description
Namaskara,
Currently in Wt::Auth, to create a PasswordVerifier,we have a C'tor and after creating the object we add the hash function using : addHashFunction method.
as follows:
auto verifier = std::make_uniqueWt::Auth::PasswordVerifier();
verifier->addHashFunction(std::make_uniqueWt::Auth::BCryptHashFunction(7));
It would advantageous (and more secure) if we overload the PasswordVerifier so that we can embed the hash function at the time of object creation as thus....
auto verifier = std::make_uniqueWt::Auth::PasswordVerifier(std::make_uniqueWt::Auth::BCryptHashFunction(7));
Regards
Rathnadhar K V
Updated by Rathnadhar K V over 2 years ago
Better still have BCRYPT as enum...so that my API would be
auto verifier = std::make_uniqueWt::Auth::PasswordVerifier(BCryptHashFunction,7);
that is much simpler and elegant.
Regards
Rathnadhar KV