MySQL 9.1.0
Source Code Documentation
impl Namespace Reference

Classes

class  HttpServerComponentImpl
 

Functions

static std::optional< std::vector< uint8_t > > scramble (std::string_view nonce, std::string_view password, const EVP_MD *digest_func, bool nonce_before_double_hashed_password)
 scramble the password using the client's scheme. More...
 

Function Documentation

◆ scramble()

static std::optional< std::vector< uint8_t > > impl::scramble ( std::string_view  nonce,
std::string_view  password,
const EVP_MD *  digest_func,
bool  nonce_before_double_hashed_password 
)
static

scramble the password using the client's scheme.

  • mysql_native_password
    • message-digest: SHA1
    • inner message-digest-order: nonce + double_hashed_password
  • caching_sha256_password
    • message-digest: SHA256
    • inner message-digest-order: double_hashed_password + nonce
Parameters
noncenonce used between server and client
passwordcleartext password to be scrambled
digest_funcdigest function
nonce_before_double_hashed_passwordif true, nonce appears before double_hashed_password; if false, nonce appears after double_hashed_password
Returns
auth-response a client would send it