2
* Passhash9 Password Hashing
5
* Botan is released under the Simplified BSD License (see license.txt)
8
#ifndef BOTAN_PASSHASH9_H_
9
#define BOTAN_PASSHASH9_H_
11
#include <botan/types.h>
16
class RandomNumberGenerator;
19
* Create a password hash using PBKDF2
20
* @param password the password
21
* @param rng a random number generator
22
* @param work_factor how much work to do to slow down guessing attacks
23
* @param alg_id specifies which PRF to use with PBKDF2
29
* all other values are currently undefined
31
std::string BOTAN_PUBLIC_API(2,0) generate_passhash9(const std::string& password,
32
RandomNumberGenerator& rng,
33
uint16_t work_factor = 10,
37
* Check a previously created password hash
38
* @param password the password to check against
39
* @param hash the stored hash to check against
41
bool BOTAN_PUBLIC_API(2,0) check_passhash9(const std::string& password,
42
const std::string& hash);
45
* Check if the PRF used with PBKDF2 is supported
46
* @param alg_id alg_id used in generate_passhash9()
48
bool BOTAN_PUBLIC_API(2,3) is_passhash9_alg_supported(uint8_t alg_id);