27 static std::string
hash(
const std::string& password);
34 static bool verify(
const std::string& password,
const std::string& storedHash);
static std::string hash(const std::string &password)
Hashes the given password using PBKDF2-SHA256 with a fresh cryptographic random salt.
static bool requiresPassword(const std::string &storedHash)
Returns true if the stored hash is non-empty, meaning a password is required to authenticate this acc...
DtPasswordHasher — PBKDF2-SHA256 password hashing and verification utility.
Definition: passwordHasher.h:19
static bool verify(const std::string &password, const std::string &storedHash)
Verifies a plaintext password against a previously stored hash string. Uses constant-time comparison ...