MySQL 9.1.0
Source Code Documentation
sha2_password Namespace Reference

Classes

class  Caching_sha2_password
 Class to handle caching_sha2_authentication Provides methods for: More...
 
class  Generate_digest
 Interface for cryptographic digest generation. More...
 
class  Generate_scramble
 Scramble generator Responsible for generating scramble of following format: XOR(SHA2(m_src), SHA2(SHA2(SHA2(m_src)), m_rnd)) More...
 
class  SHA256_digest
 SHA256 digest generator. More...
 
struct  sha2_cache_entry
 
class  SHA2_password_cache
 Password cache used for caching_sha2_authentication. More...
 
class  Validate_scramble
 Scramble validator Expects scramble to be: XOR(SHA2(m_src), SHA2(SHA2(SHA2(m_src)), m_rnd)) Validates it against: SHA2(SHA2(m_src)) and random string. More...
 

Typedefs

typedef struct sha2_password::sha2_cache_entry sha2_cache_entry
 

Enumerations

enum class  Digest_info { SHA256_DIGEST = 0 , DIGEST_LAST }
 Supported digest information. More...
 

Variables

const unsigned int MIN_FAST_DIGEST_ROUNDS = 2
 
const unsigned int DEFAULT_FAST_DIGEST_ROUNDS = 2
 
const unsigned int MAX_FAST_DIGEST_ROUNDS = 1000
 
const unsigned int DIGEST_INFO_LENGTH = 1
 
const unsigned int ITERATION_LENGTH = 3
 
const unsigned int ITERATION_MULTIPLIER = 1000
 
const long unsigned int MAX_ITERATIONS = 0xFFF * ITERATION_MULTIPLIER
 
const unsigned int SALT_LENGTH = CRYPT_SALT_LENGTH
 
const unsigned int SHA256_AUTH_STRING_LEN
 
const char DELIMITER = '$'
 
const unsigned int STORED_SHA256_DIGEST_LENGTH = 43
 
const size_t MIN_STORED_DIGEST_ROUNDS = ROUNDS_MIN
 
const size_t DEFAULT_STORED_DIGEST_ROUNDS = ROUNDS_DEFAULT
 
const size_t MAX_STORED_DIGEST_ROUNDS = ROUNDS_MAX
 
const size_t CACHING_SHA2_PASSWORD_MAX_PASSWORD_LENGTH = MAX_PLAINTEXT_LENGTH
 
const unsigned int MAX_PASSWORDS = 2
 
const unsigned int CACHING_SHA2_DIGEST_LENGTH = SHA256_DIGEST_LENGTH
 
static const char * category = "sha2_auth"
 
static PSI_rwlock_key key_m_cache_lock
 
static PSI_rwlock_info all_rwlocks []
 

Typedef Documentation

◆ sha2_cache_entry

Enumeration Type Documentation

◆ Digest_info

enum class sha2_password::Digest_info
strong

Supported digest information.

Enumerator
SHA256_DIGEST 
DIGEST_LAST 

Variable Documentation

◆ all_rwlocks

PSI_rwlock_info sha2_password::all_rwlocks[]
static
Initial value:
= {
{&key_m_cache_lock, "key_m_cache_lock", 0, 0, PSI_DOCUMENT_ME}}
#define PSI_DOCUMENT_ME
Definition: component_common.h:29
static PSI_rwlock_key key_m_cache_lock
Definition: sha2_password.cc:171

◆ CACHING_SHA2_DIGEST_LENGTH

const unsigned int sha2_password::CACHING_SHA2_DIGEST_LENGTH = SHA256_DIGEST_LENGTH

◆ CACHING_SHA2_PASSWORD_MAX_PASSWORD_LENGTH

const size_t sha2_password::CACHING_SHA2_PASSWORD_MAX_PASSWORD_LENGTH = MAX_PLAINTEXT_LENGTH

◆ category

const char* sha2_password::category = "sha2_auth"
static

◆ DEFAULT_FAST_DIGEST_ROUNDS

const unsigned int sha2_password::DEFAULT_FAST_DIGEST_ROUNDS = 2

◆ DEFAULT_STORED_DIGEST_ROUNDS

const size_t sha2_password::DEFAULT_STORED_DIGEST_ROUNDS = ROUNDS_DEFAULT

◆ DELIMITER

const char sha2_password::DELIMITER = '$'

◆ DIGEST_INFO_LENGTH

const unsigned int sha2_password::DIGEST_INFO_LENGTH = 1

◆ ITERATION_LENGTH

const unsigned int sha2_password::ITERATION_LENGTH = 3

◆ ITERATION_MULTIPLIER

const unsigned int sha2_password::ITERATION_MULTIPLIER = 1000

◆ key_m_cache_lock

PSI_rwlock_key sha2_password::key_m_cache_lock
static

◆ MAX_FAST_DIGEST_ROUNDS

const unsigned int sha2_password::MAX_FAST_DIGEST_ROUNDS = 1000

◆ MAX_ITERATIONS

const long unsigned int sha2_password::MAX_ITERATIONS = 0xFFF * ITERATION_MULTIPLIER

◆ MAX_PASSWORDS

const unsigned int sha2_password::MAX_PASSWORDS = 2

◆ MAX_STORED_DIGEST_ROUNDS

const size_t sha2_password::MAX_STORED_DIGEST_ROUNDS = ROUNDS_MAX

◆ MIN_FAST_DIGEST_ROUNDS

const unsigned int sha2_password::MIN_FAST_DIGEST_ROUNDS = 2

◆ MIN_STORED_DIGEST_ROUNDS

const size_t sha2_password::MIN_STORED_DIGEST_ROUNDS = ROUNDS_MIN

◆ SALT_LENGTH

const unsigned int sha2_password::SALT_LENGTH = CRYPT_SALT_LENGTH

◆ SHA256_AUTH_STRING_LEN

const unsigned int sha2_password::SHA256_AUTH_STRING_LEN
Initial value:
=
const unsigned int CACHING_SHA2_DIGEST_LENGTH
Definition: i_sha2_password_common.h:45
const unsigned int ITERATION_LENGTH
Definition: i_sha2_password.h:54
const unsigned int SALT_LENGTH
Definition: i_sha2_password.h:60

◆ STORED_SHA256_DIGEST_LENGTH

const unsigned int sha2_password::STORED_SHA256_DIGEST_LENGTH = 43