The Battle for Wesnoth  1.15.1+dev
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | List of all members
utils::bcrypt Class Reference

#include <hash.hpp>

Inheritance diagram for utils::bcrypt:
Inheritance graph

Public Member Functions

std::string get_salt () const
 
virtual std::string hex_digest () const override
 
virtual std::string base64_digest () const override
 
- Public Member Functions inherited from utils::hash_digest< BCRYPT_HASHSIZE, char >
std::array< char, sz > raw_digest () const
 
- Public Member Functions inherited from utils::hash_base
virtual ~hash_base ()
 

Static Public Member Functions

static bcrypt from_salted_salt (const std::string &input)
 
static bcrypt from_hash_string (const std::string &input)
 
static bcrypt hash_pw (const std::string &password, bcrypt &salt)
 
static bool is_valid_prefix (const std::string &hash)
 

Public Attributes

std::size_t iteration_count_delim_pos
 

Private Member Functions

 bcrypt ()
 
 bcrypt (const std::string &input)
 

Additional Inherited Members

- Static Public Attributes inherited from utils::hash_digest< BCRYPT_HASHSIZE, char >
static const int DIGEST_SIZE
 
- Protected Attributes inherited from utils::hash_digest< BCRYPT_HASHSIZE, char >
std::array< char, sz > hash
 

Detailed Description

Definition at line 73 of file hash.hpp.

Constructor & Destructor Documentation

◆ bcrypt() [1/2]

utils::bcrypt::bcrypt ( )
inlineprivate

Definition at line 75 of file hash.hpp.

References preferences::password().

◆ bcrypt() [2/2]

utils::bcrypt::bcrypt ( const std::string &  input)
private

Definition at line 148 of file hash.cpp.

Member Function Documentation

◆ base64_digest()

std::string utils::bcrypt::base64_digest ( ) const
overridevirtual

Implements utils::hash_base.

Definition at line 207 of file hash.cpp.

◆ from_hash_string()

bcrypt utils::bcrypt::from_hash_string ( const std::string &  input)
static

Definition at line 168 of file hash.cpp.

References BCRYPT_HASHSIZE.

◆ from_salted_salt()

bcrypt utils::bcrypt::from_salted_salt ( const std::string &  input)
static

Definition at line 157 of file hash.cpp.

References BCRYPT_HASHSIZE.

◆ get_salt()

std::string utils::bcrypt::get_salt ( ) const

Definition at line 194 of file hash.cpp.

References BCRYPT_HASHSIZE.

◆ hash_pw()

bcrypt utils::bcrypt::hash_pw ( const std::string &  password,
bcrypt salt 
)
static

◆ hex_digest()

std::string utils::bcrypt::hex_digest ( ) const
overridevirtual

Implements utils::hash_base.

Definition at line 202 of file hash.cpp.

◆ is_valid_prefix()

bool utils::bcrypt::is_valid_prefix ( const std::string &  hash)
static

Definition at line 187 of file hash.cpp.

Member Data Documentation

◆ iteration_count_delim_pos

std::size_t utils::bcrypt::iteration_count_delim_pos

Definition at line 83 of file hash.hpp.


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