MySQL 8.4.2
Source Code Documentation
Key_pbkdf2_hmac_function Class Reference

Class to implement KDF method pbkdf2_hmac. More...

#include <my_kdf.h>

Inheritance diagram for Key_pbkdf2_hmac_function:
[legend]

Public Member Functions

 Key_pbkdf2_hmac_function (vector< string > *kdf_options)
 pbkdf2_hmac Constructor. More...
 
virtual ~Key_pbkdf2_hmac_function () override
 
int derive_key (const unsigned char *key, const unsigned int key_length, unsigned char *rkey, unsigned int key_size) override
 
int validate_options () override
 
- Public Member Functions inherited from Key_derivation_function
virtual ~Key_derivation_function ()
 

Private Attributes

string salt_
 
int iterations_ {0}
 

Additional Inherited Members

- Protected Attributes inherited from Key_derivation_function
vector< string > * kdf_options_ {nullptr}
 
bool options_valid_ {false}
 

Detailed Description

Class to implement KDF method pbkdf2_hmac.

Constructor & Destructor Documentation

◆ Key_pbkdf2_hmac_function()

Key_pbkdf2_hmac_function::Key_pbkdf2_hmac_function ( vector< string > *  kdf_options)

pbkdf2_hmac Constructor.

Parameters
kdf_optionsoptions

kdf_options has following KDF options:

  1. KDF function name
  2. KDF salt: The salt. Salts prevent attacks based on dictionaries of common passwords and attacks based on rainbow tables. It is a public value that can be safely stored along with the encryption key.
  3. KDF info: The iteration count. This provides the ability to tune the algorithm. It is better to use the highest count possible for the maximum resistance to brute-force attacks.

◆ ~Key_pbkdf2_hmac_function()

virtual Key_pbkdf2_hmac_function::~Key_pbkdf2_hmac_function ( )
inlineoverridevirtual

Member Function Documentation

◆ derive_key()

int Key_pbkdf2_hmac_function::derive_key ( const unsigned char *  key,
const unsigned int  key_length,
unsigned char *  rkey,
unsigned int  key_size 
)
overridevirtual

◆ validate_options()

int Key_pbkdf2_hmac_function::validate_options ( )
overridevirtual

Member Data Documentation

◆ iterations_

int Key_pbkdf2_hmac_function::iterations_ {0}
private

◆ salt_

string Key_pbkdf2_hmac_function::salt_
private

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