37 #ifndef _USERNAME_HASH_HPP_INCLUDED
38 #define _USERNAME_HASH_HPP_INCLUDED
42 #include "crypto/HMAC.h"
54 UsernameHash(
const unsigned char *slt, std::size_t sltSize,
55 const std::string& username );
69 std::string
toBCD()
const;
79 bool operator != (
const std::string& rhs ) {
return !( *
this == rhs ); }
89 #endif // _USERNAME_HASH_HPP_INCLUDED
Definition: usernameHash.hpp:50
bool operator==(const UsernameHash &rhs)
True if the 2 user hashes are identical, false otherwise.
static const size_t USERNAME_HASH_SALT_SIZE
Definition: usernameHash.hpp:48
Random Generator interface class.
Definition: randomGenerator.hpp:45
unsigned char m_hash[USERNAME_HASH_SIZE]
Definition: usernameHash.hpp:84
std::string toBCD() const
Return a BCD string in the format :
unsigned char m_salt[USERNAME_HASH_SALT_SIZE]
Definition: usernameHash.hpp:83
unsigned char * hash()
Definition: usernameHash.hpp:62
std::string toString() const
Return a base64 string in the format $$
bool operator!=(const UsernameHash &rhs)
Definition: usernameHash.hpp:73
static const size_t USERNAME_HASH_SIZE
Definition: usernameHash.hpp:47
Random Generator interface class.
std::size_t hashSize() const
Definition: usernameHash.hpp:63
UsernameHash(const crypto::RandomGenerator &rndGen, const std::string &username)
unsigned char * salt()
Definition: usernameHash.hpp:60
std::size_t saltSize() const
Definition: usernameHash.hpp:61
std::size_t m_saltSize
Definition: usernameHash.hpp:82