|
CXI
|
Utility Functions. More...
Static Public Member Functions | |
| static void | store_int2 (unsigned int val, unsigned char *buf) |
| static void | store_int3 (unsigned int val, unsigned char *buf) |
| static void | store_int4 (unsigned int val, unsigned char *buf) |
| static unsigned int | load_int2 (const unsigned char *buf) |
| static unsigned int | load_int3 (const unsigned char *buf) |
| static unsigned int | load_int4 (const unsigned char *buf) |
| static void | xtrace (FILE *fp, const char *prefix, const char *text, const void *data, int len) |
| static void | xtrace (const char *text, const void *data, int len) |
| static void | xtrace (const char *text, const ByteArray &ba) |
Utility Functions.
The Util class implements as set of utility functions. Some of the static methods may be useful for applications that work with the CryptoServer.
|
static |
Stores a 2-byte integer in to a character buffer. The integer is stored in big endian order.
| val | Integer value to be stored (unsigned). |
| buf | Byte array into which the integer is stored. |
|
static |
Stores a 3-byte integer in to a character buffer. The integer is stored in big endian order.
| val | Integer value to be stored (unsigned). |
| buf | Byte array into which the integer is stored. |
|
static |
Stores a 4-byte integer in to a character buffer. The integer is stored in big endian order.
| val | Integer value to be stored (unsigned). |
| buf | Byte array into which the integer is stored. |
|
static |
Loads a 2-byte integer from a character buffer. The integer must be stored in big endian order.
| buf | Buffer from which the integer is loaded. |
|
static |
Loads a 3-byte integer from a character buffer. The integer must be stored in big endian order.
| buf | Buffer from which the integer is loaded. |
|
static |
Loads a 4-byte integer from a character buffer. The integer must be stored in big endian order.
| buf | Buffer from which the integer is loaded. |
|
static |
Dumps binary data to a file stream. The binary data is converted to hexadecimal notation.
| fp | target file stream |
| prefix | string to print before each line |
| text | tag (optional) |
| data | pointer to binary data |
| len | length of binary data |
|
static |
Dumps binary data to stdout. The binary data is converted to hexadecimal notation.
| text | tag (optional) |
| data | pointer to binary data |
| len | length of binary data |
|
static |
Dumps binary data to stdout. The binary data is converted to hexadecimal notation.
| text | tag (optional) |
| ba | byte arry to be dumped |