MySQL 8.4.1
Source Code Documentation
common.cc File Reference
#include "common.h"
#include <openssl/evp.h>
#include <mysql_com.h>
#include <mysql/service_mysql_alloc.h>

Macros

#define MYSQL_DYNAMIC_PLUGIN
 

Functions

void get_plugin_messages (const std::string &msg, message_type type)
 
int get_user_input (const std::string &msg, input_type type, void *arg, const unsigned int *optional_arg_size)
 
void url_compatible_base64 (char *url_compatible_str, size_t len, char *base64_str)
 Helper method to convert base64 string to url safe base64. More...
 
bool generate_sha256 (const unsigned char *in_key, unsigned int in_key_length, unsigned char *hash, unsigned int &hash_length)
 

Macro Definition Documentation

◆ MYSQL_DYNAMIC_PLUGIN

#define MYSQL_DYNAMIC_PLUGIN

Function Documentation

◆ generate_sha256()

bool generate_sha256 ( const unsigned char *  in_key,
unsigned int  in_key_length,
unsigned char *  hash,
unsigned int &  hash_length 
)

◆ get_plugin_messages()

void get_plugin_messages ( const std::string &  msg,
message_type  type 
)

◆ get_user_input()

int get_user_input ( const std::string &  msg,
input_type  type,
void *  arg,
const unsigned int *  optional_arg_size 
)

◆ url_compatible_base64()

void url_compatible_base64 ( char *  url_compatible_str,
size_t  len,
char *  base64_str 
)

Helper method to convert base64 string to url safe base64.

Using standard Base64 in URL requires replacing of '+', '/' and '=' characters. '+' will be replaced with '-' '/' will be replaced with '_' '=' is used for padding which will be removed.

Parameters
[out]url_compatible_strurl safe base64 string
[in]lenlength of base64 string
[in]base64_strbase64 string