chloride.password

Members

Classes

Argon2Hasher
class Argon2Hasher

A PwHasher that uses the argon2 algorithm

ScryptHasher
class ScryptHasher

A PwHasher that uses the scrypt algorithm

Enums

Algorithm
enum Algorithm

Algorithm to use for the password hashing.

Functions

hashPassword
string hashPassword(Algorithm alg, string password, PwHashConfig config)
string hashPassword(string password, PwHashConfig config)

Convenience function to hash a password.

verifyPassword
bool verifyPassword(Algorithm alg, string password, string hash)

Convenience function to verify a password.

verifyPassword
bool verifyPassword(string password, string hash)

Verify a passwod with a hash string.

Interfaces

PwHasher
interface PwHasher

An object that can hash and verify passwords.

Structs

PwHashConfig
struct PwHashConfig

Struct containing configuration for password hashing. Specifically the parameters to control the amount of CPU and memory required.

Templates

PwHash
template PwHash(Algorithm alg)

Meta