MySQL 9.0.0
Source Code Documentation
my_hex_tools.h File Reference

Go to the source code of this file.

Functions

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

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