Project

General

Profile

Actions

Improvements #9107

open

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

Added by Rathnadhar K V over 2 years ago. Updated over 2 years ago.

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

0%

Estimated time:
0:30 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

Actions #1

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

Actions

Also available in: Atom PDF