StrOps::OtoX( const unsigned char *, int, StrBuf & )
Convert an octet stream into hex.
Virtual? |
No |
|
Class |
||
Arguments |
|
the input stream |
|
length of the input in bytes |
|
|
the output string |
|
Returns |
|
Notes
This function converts the input stream into a string of hexadecimal numbers, with each byte from the input being represented as exactly two hex digits.
Example
const unsigned char stream[3] = { 'f', 'o', 'o' }; StrBuf hex; StrOps::OtoX( stream, 3, hex ); StrOps::Dump( hex ); return 0;
Executing the preceding code produces the following output:
% a.out 666F6F