Project

General

Profile

Improvements #9107

New overloaded C'tor for Wt::Auth::PasswordVerifier

Added by Rathnadhar K V 22 days ago. Updated 20 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/25/2021
Due date:
% Done:

0%

Estimated time:
0.50 h

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

#1

Updated by Rathnadhar K V 20 days 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

Also available in: Atom PDF