MySQL 9.1.0
Source Code Documentation
keyring_memory.cc File Reference
#include "keyring/keyring_memory.h"
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <stdexcept>
#include <openssl/evp.h>
#include "mysql/harness/tls_cipher.h"

Namespaces

namespace  mysql_harness
 

Functions

static std::size_t serialize (char *buffer, std::size_t offset, const void *data, std::size_t data_size)
 
static std::size_t serialize (char *buffer, std::size_t offset, std::size_t value)
 
static std::size_t serialize (char *buffer, std::size_t offset, const std::string &value)
 
static std::size_t serialize (char *buffer, const std::map< std::string, std::map< std::string, std::string > > &entries)
 
static void check_buffer_size (std::size_t data_size, std::size_t buffer_size, std::size_t offset)
 
static std::size_t parse (const char *buffer, std::size_t buffer_size, std::size_t offset, void *data, std::size_t data_size)
 
static std::size_t parse (const char *buffer, std::size_t buffer_size, std::size_t offset, std::size_t &value)
 
static std::size_t parse (const char *buffer, std::size_t buffer_size, std::size_t offset, std::string &value)
 
static void parse (const char *buffer, std::size_t buffer_size, std::map< std::string, std::map< std::string, std::string > > &entries)
 

Variables

constexpr unsigned char kAesIv []
 
constexpr std::uint32_t kKeyringDataSignature = 0x043d4d0a
 

Function Documentation

◆ check_buffer_size()

static void check_buffer_size ( std::size_t  data_size,
std::size_t  buffer_size,
std::size_t  offset 
)
static

◆ parse() [1/4]

static void parse ( const char *  buffer,
std::size_t  buffer_size,
std::map< std::string, std::map< std::string, std::string > > &  entries 
)
static

◆ parse() [2/4]

static std::size_t parse ( const char *  buffer,
std::size_t  buffer_size,
std::size_t  offset,
std::size_t &  value 
)
static

◆ parse() [3/4]

static std::size_t parse ( const char *  buffer,
std::size_t  buffer_size,
std::size_t  offset,
std::string &  value 
)
static

◆ parse() [4/4]

static std::size_t parse ( const char *  buffer,
std::size_t  buffer_size,
std::size_t  offset,
void *  data,
std::size_t  data_size 
)
static

◆ serialize() [1/4]

static std::size_t serialize ( char *  buffer,
const std::map< std::string, std::map< std::string, std::string > > &  entries 
)
static

◆ serialize() [2/4]

static std::size_t serialize ( char *  buffer,
std::size_t  offset,
const std::string &  value 
)
static

◆ serialize() [3/4]

static std::size_t serialize ( char *  buffer,
std::size_t  offset,
const void *  data,
std::size_t  data_size 
)
static

◆ serialize() [4/4]

static std::size_t serialize ( char *  buffer,
std::size_t  offset,
std::size_t  value 
)
static

Variable Documentation

◆ kAesIv

constexpr unsigned char kAesIv[]
constexpr
Initial value:
= {0x39, 0x62, 0x9f, 0x52, 0x7f, 0x76,
0x9a, 0xae, 0xcd, 0xca, 0xf7, 0x04,
0x65, 0x8e, 0x5d, 0x88}

◆ kKeyringDataSignature

constexpr std::uint32_t kKeyringDataSignature = 0x043d4d0a
constexpr