Password hash.
More...
#include <passwordHash.hpp>
_Wolframe::AAAA::PasswordHash::PasswordHash |
( |
| ) |
|
|
inline |
Construct an empty password hash.
_Wolframe::AAAA::PasswordHash::PasswordHash |
( |
const crypto::RandomGenerator & |
rndGen, |
|
|
const std::string & |
password |
|
) |
| |
Construct the password hash with a random salt
- Parameters
-
rndGen | the random number generator |
password | password as plain text |
_Wolframe::AAAA::PasswordHash::PasswordHash |
( |
const unsigned char * |
pwdSalt, |
|
|
size_t |
bytes, |
|
|
const std::string & |
password |
|
) |
| |
Construct the password hash from salt and password (plain text)
- Parameters
-
pwdSalt | password salt as bytes |
bytes | password salt length in bytes |
password | password as plain text |
_Wolframe::AAAA::PasswordHash::PasswordHash |
( |
const Salt & |
pwdSalt, |
|
|
const std::string & |
password |
|
) |
| |
Construct the password hash from salt and password (plain text)
- Parameters
-
_Wolframe::AAAA::PasswordHash::PasswordHash |
( |
const std::string & |
pwdSalt, |
|
|
const std::string & |
password |
|
) |
| |
Construct the password hash from salt and password (plain text)
- Parameters
-
pwdSalt | password salt as a base64 string |
password | password as plain text |
_Wolframe::AAAA::PasswordHash::PasswordHash |
( |
const std::string & |
str | ) |
|
Construct the password hash from a combined password hash string (base64)
- Parameters
-
str | password hash string in format $<salt>$<hash> if the string doesn't start with '$' then the string is considered to represent only the password hash as base64 and the salt will be zeroed |
const Hash& _Wolframe::AAAA::PasswordHash::hash |
( |
| ) |
const |
|
inline |
The unsigned char vector of the password hash.
const Salt& _Wolframe::AAAA::PasswordHash::salt |
( |
| ) |
const |
|
inline |
std::string _Wolframe::AAAA::PasswordHash::toBCD |
( |
| ) |
const |
Return the password hash as a BCD string. The format is $<salt>$<hash> on one line, no whitespaces.
std::string _Wolframe::AAAA::PasswordHash::toString |
( |
| ) |
const |
Return the password hash as a base64 string without base64 padding. The format is $<salt>$<hash> on one line, no whitespaces.
Hash _Wolframe::AAAA::PasswordHash::m_hash |
|
private |
Salt _Wolframe::AAAA::PasswordHash::m_salt |
|
private |
The documentation for this class was generated from the following file: