bcrypt.hpp
Go to the documentation of this file.
109 static void generate(const std::string &pass, const std::vector<uint8_t> &salt, uint16_t work_factor) {
Bcrypt is a password hashing scheme originally designed for use in OpenBSD, but numerous other implem...
Definition: bcrypt.hpp:68
policy_type::cipher_type cipher_type
Definition: bcrypt.hpp:72
static void generate(const std::string &pass, const std::vector< uint8_t > &salt, uint16_t work_factor)
Takes the password to hash, a rng, and a work factor. The resulting password hash is returned as a st...
Definition: bcrypt.hpp:109
static bool check(const std::string &pass, const std::string &hash) const
Takes a password and a bcrypt output and returns true if the password is the same as the one that was...
Definition: bcrypt.hpp:138
std::enable_if<!boost::accumulators::detail::is_accumulator_set< OutputIterator >::value, OutputIterator >::type hash(InputIterator first, InputIterator last, OutputIterator out)
Definition: algorithm/hash.hpp:78
boost::mpl::apply< AccumulatorSet, tag::block< Mode > >::type::result_type block(const AccumulatorSet &acc)
Definition: accumulators/block.hpp:259
boost::mpl::apply< AccumulatorSet, tag::passhash< Hash > >::type::result_type passhash(const AccumulatorSet &acc)
Definition: accumulators/passhash.hpp:121
const uint8_t * cast_char_ptr_to_uint8(const char *s)
Definition: memory_operations.hpp:205
bool same_mem(const T *p1, const T *p2, size_t n)
Definition: memory_operations.hpp:229
std::string generate_bcrypt(const std::string &password, UniformRandomGenerator &rng, uint16_t work_factor=10)
Definition: bcrypt.hpp:167
bool check_bcrypt(const std::string &password, const std::string &hash)
Definition: pair.hpp:31
Definition: bcrypt_functions.hpp:37
policy_type::cipher_type cipher_type
Definition: bcrypt_functions.hpp:40