Wolframe, 0.0.3

_Wolframe::AAAA::PasswordHash::Salt Class Reference

#include <passwordHash.hpp>

Public Member Functions

 Salt ()
 Construct an empty salt (all bits 0). More...
 
 Salt (const crypto::RandomGenerator &rndGen)
 Construct a random salt. More...
 
 Salt (const unsigned char *data, size_t bytes)
 Construct a salt from the given byte array. More...
 
 Salt (const std::string &str)
 Construct a salt by setting the value from the base64 encoded string. More...
 
 ~Salt ()
 Destructor (set all bits 0). More...
 
bool operator== (const Salt &rhs)
 True if the 2 password salts are identical, false otherwise. More...
 
bool operator!= (const Salt &rhs)
 
size_t size () const
 The size of the salt in bytes. More...
 
const unsigned char * salt () const
 The unsigned char vector of the salt. More...
 
std::string toBCD () const
 Return the salt as a BCD encoded string. More...
 
std::string toString () const
 Return the salt as a base64 encoded string (without base64 padding). More...
 

Private Attributes

std::size_t m_size
 
unsigned char m_salt [PASSWORD_SALT_SIZE]
 

Friends

class PasswordHash
 

Constructor & Destructor Documentation

_Wolframe::AAAA::PasswordHash::Salt::Salt ( )

Construct an empty salt (all bits 0).

_Wolframe::AAAA::PasswordHash::Salt::Salt ( const crypto::RandomGenerator rndGen)

Construct a random salt.

_Wolframe::AAAA::PasswordHash::Salt::Salt ( const unsigned char *  data,
size_t  bytes 
)

Construct a salt from the given byte array.

_Wolframe::AAAA::PasswordHash::Salt::Salt ( const std::string &  str)

Construct a salt by setting the value from the base64 encoded string.

_Wolframe::AAAA::PasswordHash::Salt::~Salt ( )

Destructor (set all bits 0).

Member Function Documentation

bool _Wolframe::AAAA::PasswordHash::Salt::operator!= ( const Salt rhs)
inline
bool _Wolframe::AAAA::PasswordHash::Salt::operator== ( const Salt rhs)

True if the 2 password salts are identical, false otherwise.

const unsigned char* _Wolframe::AAAA::PasswordHash::Salt::salt ( ) const
inline

The unsigned char vector of the salt.

size_t _Wolframe::AAAA::PasswordHash::Salt::size ( ) const
inline

The size of the salt in bytes.

std::string _Wolframe::AAAA::PasswordHash::Salt::toBCD ( ) const

Return the salt as a BCD encoded string.

std::string _Wolframe::AAAA::PasswordHash::Salt::toString ( ) const

Return the salt as a base64 encoded string (without base64 padding).

Friends And Related Function Documentation

friend class PasswordHash
friend

Member Data Documentation

unsigned char _Wolframe::AAAA::PasswordHash::Salt::m_salt[PASSWORD_SALT_SIZE]
private
std::size_t _Wolframe::AAAA::PasswordHash::Salt::m_size
private

The documentation for this class was generated from the following file: