MySQL 8.0.39
Source Code Documentation
my_hex_tools.cc File Reference
#include <cstddef>
#include <cstdint>
#include "mysql/components/library_mysys/my_hex_tools.h"

Namespaces

namespace  anonymous_namespace{my_hex_tools.cc}
 

Functions

unsigned long unhex_string (const char *first, const char *last, char *output)
 Convert hex string to byte array. More...
 
unsigned long hex_string (char *to, const char *from, unsigned long length)
 Convert byte array to hex string. More...
 

Variables

constexpr const int anonymous_namespace{my_hex_tools.cc}::lookup_unhex_high [256]
 
constexpr const int anonymous_namespace{my_hex_tools.cc}::lookup_unhex_low [256]
 
const char anonymous_namespace{my_hex_tools.cc}::_dig_vec_upper [] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 

Function Documentation

◆ hex_string()

unsigned long hex_string ( char *  to,
const char *  from,
unsigned long  length 
)

Convert byte array to hex string.

Parameters
[out]toOutput buffer
[in]fromInput byte array
[in]lengthLength of input
Returns
Length of output string

◆ unhex_string()

unsigned long unhex_string ( const char *  first,
const char *  last,
char *  output 
)

Convert hex string to byte array.

Parameters
[in]firstPointer to first element of range to convert
[in]lastPointer to one-after-last element of range to convert
[out]outputBeginning of destination range.
Returns
Length of output string