MySQL 9.1.0
Source Code Documentation
AuthSha256Password Class Reference

#include <classic_auth_sha256_password.h>

Inheritance diagram for AuthSha256Password:
[legend]

Static Public Member Functions

static std::optional< std::string > scramble (std::string_view nonce, std::string_view pwd)
 
static stdx::expected< size_t, std::error_code > send_public_key_request (Channel &dst_channel, ClassicProtocolState &dst_protocol)
 
static stdx::expected< size_t, std::error_code > send_public_key (Channel &dst_channel, ClassicProtocolState &dst_protocol, const std::string &public_key)
 
static stdx::expected< size_t, std::error_code > send_plaintext_password (Channel &dst_channel, ClassicProtocolState &dst_protocol, const std::string &password)
 
static stdx::expected< size_t, std::error_code > send_encrypted_password (Channel &dst_channel, ClassicProtocolState &dst_protocol, const std::string &password)
 
static bool is_public_key_request (const std::string_view &data)
 
static bool is_public_key (const std::string_view &data)
 
- Static Public Member Functions inherited from AuthBase
static stdx::expected< std::string, std::error_code > public_key_from_ssl_ctx_as_pem (SSL_CTX *ssl_ctx)
 
static stdx::expected< EvpPkey, std::error_code > public_key_from_pem (std::string_view pubkey)
 
static stdx::expected< std::string, std::error_code > public_key_encrypt (std::string plaintext, EVP_PKEY *pkey)
 
static stdx::expected< std::string, std::error_code > private_key_decrypt (std::string_view ciphertext, EVP_PKEY *priv)
 
static stdx::expected< std::string, std::error_code > rsa_decrypt_password (SSL_CTX *ssl_ctx, std::string_view encrypted, std::string_view nonce)
 
static stdx::expected< std::string, std::error_code > rsa_encrypt_password (const EvpPkey &pkey, std::string_view password, std::string_view nonce)
 
static std::string_view strip_trailing_null (std::string_view s)
 remove trailing \0 in a string_view. More...
 
static bool connection_has_public_key (MysqlRoutingClassicConnectionBase *connection)
 

Static Public Attributes

static constexpr const size_t kNonceLength {20}
 
static constexpr const std::string_view kName {"sha256_password"}
 
static constexpr const std::string_view kEmptyPassword {"\x00", 1}
 
static constexpr const std::string_view kPublicKeyRequest {"\x01"}
 

Member Function Documentation

◆ is_public_key()

bool AuthSha256Password::is_public_key ( const std::string_view &  data)
static

◆ is_public_key_request()

bool AuthSha256Password::is_public_key_request ( const std::string_view &  data)
static

◆ scramble()

std::optional< std::string > AuthSha256Password::scramble ( std::string_view  nonce,
std::string_view  pwd 
)
static

◆ send_encrypted_password()

stdx::expected< size_t, std::error_code > AuthSha256Password::send_encrypted_password ( Channel dst_channel,
ClassicProtocolState dst_protocol,
const std::string &  password 
)
static

◆ send_plaintext_password()

stdx::expected< size_t, std::error_code > AuthSha256Password::send_plaintext_password ( Channel dst_channel,
ClassicProtocolState dst_protocol,
const std::string &  password 
)
static

◆ send_public_key()

stdx::expected< size_t, std::error_code > AuthSha256Password::send_public_key ( Channel dst_channel,
ClassicProtocolState dst_protocol,
const std::string &  public_key 
)
static

◆ send_public_key_request()

stdx::expected< size_t, std::error_code > AuthSha256Password::send_public_key_request ( Channel dst_channel,
ClassicProtocolState dst_protocol 
)
static

Member Data Documentation

◆ kEmptyPassword

constexpr const std::string_view AuthSha256Password::kEmptyPassword {"\x00", 1}
staticconstexpr

◆ kName

constexpr const std::string_view AuthSha256Password::kName {"sha256_password"}
staticconstexpr

◆ kNonceLength

constexpr const size_t AuthSha256Password::kNonceLength {20}
staticconstexpr

◆ kPublicKeyRequest

constexpr const std::string_view AuthSha256Password::kPublicKeyRequest {"\x01"}
staticconstexpr

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