OmniSciDB  06b3bd477c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
anonymous_namespace{SysCatalog.cpp} Namespace Reference

Functions

std::string hash_with_bcrypt (const std::string &pwd)
 

Function Documentation

std::string anonymous_namespace{SysCatalog.cpp}::hash_with_bcrypt ( const std::string &  pwd)

Definition at line 66 of file SysCatalog.cpp.

References CHECK().

Referenced by Catalog_Namespace::SysCatalog::alterUser(), Catalog_Namespace::SysCatalog::createUser(), Catalog_Namespace::SysCatalog::initDB(), Catalog_Namespace::SysCatalog::updateBlankPasswordsToRandom(), and Catalog_Namespace::SysCatalog::updatePasswordsToHashes().

66  {
67  char salt[BCRYPT_HASHSIZE], hash[BCRYPT_HASHSIZE];
68  CHECK(bcrypt_gensalt(-1, salt) == 0);
69  CHECK(bcrypt_hashpw(pwd.c_str(), salt, hash) == 0);
70  return std::string(hash, BCRYPT_HASHSIZE);
71 }
CHECK(cgen_state)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: