Wolframe, 0.0.3

_Wolframe::crypto::PBKDF2_HMAC_SHA1 Class Reference

#include <PBKDF2.hpp>

Public Member Functions

 PBKDF2_HMAC_SHA1 (const unsigned char *password, size_t pwdSize, const unsigned char *salt, size_t saltSize, std::size_t dkLen, unsigned int rounds)
 
 PBKDF2_HMAC_SHA1 (const std::string &password, const std::string &salt, std::size_t dkLen, unsigned int rounds)
 
 PBKDF2_HMAC_SHA1 (const std::string &password, const unsigned char *salt, size_t saltSize, std::size_t dkLen, unsigned int rounds)
 
 PBKDF2_HMAC_SHA1 (const unsigned char *password, size_t pwdSize, const std::string &salt, std::size_t dkLen, unsigned int rounds)
 
 PBKDF2_HMAC_SHA1 (const std::string &str)
 
 ~PBKDF2_HMAC_SHA1 ()
 
const unsigned char * hash () const
 Returns the pointer to the hash. More...
 
std::size_t size () const
 Returns the hash length in bytes. More...
 
bool operator== (const PBKDF2_HMAC_SHA1 &rhs) const
 Comparisson operators. More...
 
bool operator!= (const PBKDF2_HMAC_SHA1 &rhs) const
 
bool operator== (const std::string &rhs) const
 
bool operator!= (const std::string &rhs) const
 
std::string toBCD () const
 BCD string representation of the PBKDF2-HMAC-SHA1 value. More...
 
std::string toString () const
 

Private Attributes

std::size_t m_dkLen
 hash length in bytes More...
 
unsigned char * m_hash
 the hash More...
 

Constructor & Destructor Documentation

_Wolframe::crypto::PBKDF2_HMAC_SHA1::PBKDF2_HMAC_SHA1 ( const unsigned char *  password,
size_t  pwdSize,
const unsigned char *  salt,
size_t  saltSize,
std::size_t  dkLen,
unsigned int  rounds 
)
Note
PBKDF2 constructors treat the string arguments differently. The salt is base64 encoded while the password is plain text. The base64 encoding can be with padding or without
_Wolframe::crypto::PBKDF2_HMAC_SHA1::PBKDF2_HMAC_SHA1 ( const std::string &  password,
const std::string &  salt,
std::size_t  dkLen,
unsigned int  rounds 
)
_Wolframe::crypto::PBKDF2_HMAC_SHA1::PBKDF2_HMAC_SHA1 ( const std::string &  password,
const unsigned char *  salt,
size_t  saltSize,
std::size_t  dkLen,
unsigned int  rounds 
)
_Wolframe::crypto::PBKDF2_HMAC_SHA1::PBKDF2_HMAC_SHA1 ( const unsigned char *  password,
size_t  pwdSize,
const std::string &  salt,
std::size_t  dkLen,
unsigned int  rounds 
)
_Wolframe::crypto::PBKDF2_HMAC_SHA1::PBKDF2_HMAC_SHA1 ( const std::string &  str)
Note
The string is a base64 representation of the hash
_Wolframe::crypto::PBKDF2_HMAC_SHA1::~PBKDF2_HMAC_SHA1 ( )

Member Function Documentation

const unsigned char* _Wolframe::crypto::PBKDF2_HMAC_SHA1::hash ( ) const
inline

Returns the pointer to the hash.

bool _Wolframe::crypto::PBKDF2_HMAC_SHA1::operator!= ( const PBKDF2_HMAC_SHA1 rhs) const
inline
bool _Wolframe::crypto::PBKDF2_HMAC_SHA1::operator!= ( const std::string &  rhs) const
inline
bool _Wolframe::crypto::PBKDF2_HMAC_SHA1::operator== ( const PBKDF2_HMAC_SHA1 rhs) const

Comparisson operators.

bool _Wolframe::crypto::PBKDF2_HMAC_SHA1::operator== ( const std::string &  rhs) const

Comparisson operators

Note
The string is a base64 representation of the hash
std::size_t _Wolframe::crypto::PBKDF2_HMAC_SHA1::size ( ) const
inline

Returns the hash length in bytes.

std::string _Wolframe::crypto::PBKDF2_HMAC_SHA1::toBCD ( ) const

BCD string representation of the PBKDF2-HMAC-SHA1 value.

std::string _Wolframe::crypto::PBKDF2_HMAC_SHA1::toString ( ) const

Base64 string representation of the PBKDF2-HMAC-SHA1 value.

Note
The string is without the base64 end padding

Member Data Documentation

std::size_t _Wolframe::crypto::PBKDF2_HMAC_SHA1::m_dkLen
private

hash length in bytes

unsigned char* _Wolframe::crypto::PBKDF2_HMAC_SHA1::m_hash
private

the hash


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