|
| static void | bin_to_hex (const std::vector< char > &, std::string &, bool=true) |
| | Encode to hex from binary. More...
|
| |
| static void | bin_to_hex (const void *, size_t, std::string &, bool=true) |
| | Encode to hex from binary. More...
|
| |
| static std::string | bin_to_hex (const std::vector< char > &, bool=true) |
| | Encode to hex from binary. More...
|
| |
| static std::string | bin_to_hex (const void *, size_t, bool=true) |
| | Encode to hex from binary. More...
|
| |
| static void | hex_to_bin (const std::string &, std::vector< char > &) |
| | Decode from hex to binary. More...
|
| |
| static std::string | bin_to_hexstr (const std::vector< char > &, const std::string &="", int limit=-1, const std::string &=" +more", bool=true) |
| | Binary to human readable string. More...
|
| |
| static std::string | bin_to_hexstr (const void *, size_t, const std::string &="", int limit=-1, const std::string &=" +more", bool=true) |
| | Binary to human readable string. More...
|
| |
◆ bin_to_hex() [1/4]
| std::string Hex::bin_to_hex |
( |
const std::vector< char > & |
bin, |
|
|
bool |
lower_case = true |
|
) |
| |
|
static |
Encode to hex from binary.
Encodes using two characters per byte.
- Parameters
-
| bin | Binary input. |
| lower_case | Output lower case flag. |
- Returns
- Hex string output.
Definition at line 119 of file hex.cc.
◆ bin_to_hex() [2/4]
| void Hex::bin_to_hex |
( |
const std::vector< char > & |
bin, |
|
|
std::string & |
hex, |
|
|
bool |
lower_case = true |
|
) |
| |
|
static |
Encode to hex from binary.
Encodes using two characters per byte.
- Parameters
-
| bin | Binary input. |
| hex | String output. |
| lower_case | Output lower case flag. |
Definition at line 107 of file hex.cc.
◆ bin_to_hex() [3/4]
| std::string Hex::bin_to_hex |
( |
const void * |
loc, |
|
|
size_t |
len, |
|
|
bool |
lower_case = true |
|
) |
| |
|
static |
Encode to hex from binary.
Encodes using two characters per byte.
- Parameters
-
| loc | Binary input buffer. |
| len | Binary input buffer size. |
| lower_case | Output lower case flag. |
- Returns
- Hex string output.
Definition at line 112 of file hex.cc.
◆ bin_to_hex() [4/4]
| void Hex::bin_to_hex |
( |
const void * |
xloc, |
|
|
size_t |
len, |
|
|
std::string & |
hex, |
|
|
bool |
lower_case = true |
|
) |
| |
|
static |
Encode to hex from binary.
Encodes using two characters per byte.
- Parameters
-
| loc | Binary input buffer. |
| len | Binary input buffer size. |
| hex | String output. |
| lower_case | Output lower case flag. |
Definition at line 37 of file hex.cc.
◆ bin_to_hexstr() [1/2]
| std::string Hex::bin_to_hexstr |
( |
const std::vector< char > & |
bin, |
|
|
const std::string & |
delimit = "", |
|
|
int |
limit = -1, |
|
|
const std::string & |
limit_msg = " +more", |
|
|
bool |
lower_case = true |
|
) |
| |
|
static |
Binary to human readable string.
- Parameters
-
| bin | Binary input. |
| lower_case | Output lower case flag. |
| delimit | Delimiter for output (placed between bytes) |
| limit | Limit in bytes (< 0 means no limit) |
| limit_msg | Message to add if limit exceeded |
| lower_case | Use lower case |
Output message of form HH<delimit>HH<delimit>[limit_msg]
Definition at line 102 of file hex.cc.
◆ bin_to_hexstr() [2/2]
| std::string Hex::bin_to_hexstr |
( |
const void * |
loc, |
|
|
size_t |
len, |
|
|
const std::string & |
delimit = "", |
|
|
int |
limit = -1, |
|
|
const std::string & |
limit_msg = " +more", |
|
|
bool |
lower_case = true |
|
) |
| |
|
static |
Binary to human readable string.
- Parameters
-
| loc | Binary input buffer. |
| len | Binary input buffer size. |
| lower_case | Output lower case flag. |
| delimit | Delimiter for output (placed between bytes) |
| limit | Limit in bytes (< 0 means no limit) |
| limit_msg | Message to add if limit exceeded |
| lower_case | Use lower case |
Output message of form HH<delimit>HH<delimit>[limit_msg]
Definition at line 74 of file hex.cc.
◆ hex_to_bin()
| void Hex::hex_to_bin |
( |
const std::string & |
hex, |
|
|
std::vector< char > & |
bin |
|
) |
| |
|
static |
Decode from hex to binary.
Encodes using two characters per byte.
- Parameters
-
| hex | string input. |
| bin | Binary output. |
Definition at line 126 of file hex.cc.
The documentation for this class was generated from the following files: