Botan

Passhash9 Password Hashing

License
Botan is released under the Simplified BSD License (see LICENSE.md)

string  generatePasshash9(in string pass, RandomNumberGenerator rng, ushort work_factor = 10, ubyte alg_id = 1);

Create a password hash using PBKDF2

Parameters
string pass the password
RandomNumberGenerator rng a random number generator
ushort work_factor how much work to do to slow down guessing attacks
ubyte alg_id specifies which PRF to use with PBKDF2 0 is HMAC(SHA-1) 1 is HMAC(SHA-256) 2 is CMAC(Blowfish) 3 is HMAC(SHA-384) 4 is HMAC(SHA-512) all other values are currently undefined

bool  checkPasshash9(in string password, in string hash);

Check a previously created password hash

Parameters
string password the password to check against
string hash the stored hash to check against