[][src]Function opensc_sys::sc_bin_to_hex

pub unsafe extern "C" fn sc_bin_to_hex(
    arg1: *const u8,
    arg2: size_t,
    arg3: *mut c_char,
    arg4: size_t,
    separator: c_int
) -> c_int

Converts an u8 array to a string representing the input as hexadecimal, human-readable/printable form. It's the inverse function of sc_hex_to_bin.

@param in The u8 array input to be interpreted, may be NULL iff in_len==0 @param in_len Less or equal to the amount of bytes available from in @param out output buffer offered for the string representation, MUST NOT be NULL and MUST be sufficiently sized, see out_len @param out_len MUST be at least 1 and state the maximum of bytes available within out to be written, including the \0 termination byte that will be written unconditionally @param separator The character to be used to separate the u8 string representations. 0 will suppress separation.

Example: input [0x3f], in_len=1, requiring an out_len>=3, will write to out: [0x33, 0x66, 0x00] which reads as "3f" Example: input [0x3f, 0x01], in_len=2, separator=':', req. an out_len>=6, writes to out: [0x33, 0x66, 0x3A, 0x30, 0x31, 0x00] which reads as "3f:01"