bin2hex
Converts binary data into an ASCII HEX. This function is the inverse of hex2bin.
Synopsis
int bin2hex(
char * hex,
const void * bin,
unsigned maxLen );
Parameter | Description |
---|---|
bin Input | A buffer of binary data |
hex Output | A buffer to receive the string of ASCII HEX characters |
maxLen Input | The number of characters that 'bin' contains that should be converted (this is not the length of the output buffer 'hex') |
Example
Input -
bin = "abc"
maxLen = 3
Output -
hex[7] = "616263"