bin2hex
Synopsis
int bin2hex(
char * hex,
const void * bin,
unsigned maxLen );
Description
Converts binary data into an ASCII HEX. This function is the inverse of hex2bin.
Example:
Input -
bin = "abc"
maxLen = 3
Output -
hex[7] = "616263"
Parameters
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') |