MySQL 8.0.40
Source Code Documentation
ShaCrypt Class Reference

sha256_crypt and sha512_crypt are SHA based crypt() key derivation functions. More...

#include <kdf_sha_crypt.h>

Public Types

enum class  Type { Sha256 , Sha512 , CachingSha2Password }
 

Static Public Member Functions

static std::string salt ()
 
static std::string derive (Type digest, unsigned long rounds, const std::string &salt, const std::string &password)
 

Static Private Member Functions

static std::string base64_encode (const std::vector< uint8_t > &data)
 crypt specific base64 encode. More...
 

Detailed Description

sha256_crypt and sha512_crypt are SHA based crypt() key derivation functions.

See also
https://www.akkadia.org/drepper/SHA-crypt.txt

caching_sha2_password is key derivation function taken from an internal MySQL authentication mechanism

Member Enumeration Documentation

◆ Type

enum class ShaCrypt::Type
strong
Enumerator
Sha256 
Sha512 
CachingSha2Password 

Member Function Documentation

◆ base64_encode()

std::string ShaCrypt::base64_encode ( const std::vector< uint8_t > &  data)
staticprivate

crypt specific base64 encode.

different alphabet than RFC4648

◆ derive()

std::string ShaCrypt::derive ( ShaCrypt::Type  type,
unsigned long  rounds,
const std::string &  salt,
const std::string &  password 
)
static

◆ salt()

std::string ShaCrypt::salt ( )
static

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