Functions | |
bool | verify_passphrase (const std::string &passphrase, const std::string &salt, const std::string &hash) |
Verifies the specified plain text passphrase against a salted hash. More... | |
std::pair< std::string, std::string > | generate_hash (const std::string &passphrase) |
Generates a salted hash from the specified passphrase. More... | |
std::pair< std::string, std::string > campaignd::auth::generate_hash | ( | const std::string & | passphrase | ) |
Generates a salted hash from the specified passphrase.
passphrase | Passphrase (user input). |
Definition at line 55 of file auth.cpp.
References utils::md5::base64_digest().
bool campaignd::auth::verify_passphrase | ( | const std::string & | passphrase, |
const std::string & | salt, | ||
const std::string & | hash | ||
) |
Verifies the specified plain text passphrase against a salted hash.
passphrase | Passphrase (user input). |
salt | Salt string. |
hash | Base64-encoded salted MD5 hash. |
Definition at line 50 of file auth.cpp.
References utils::md5::base64_digest().