Go to the documentation of this file.
6 uint8_t
const*
const ptr) {
9 unsigned char* b = (
unsigned char*) ptr;
15 for (
int i = size - 1;
i >= 0;
i--) {
16 for (
int j = 7; j >= 0; j--) {
17 byte = (b[
i] >> j) & 1;
18 sprintf(cStr,
"%u",
byte);
19 outString.append(cStr);
30 uint8_t
const*
const ptr) {
31 std::string outString;
33 unsigned char* b = (
unsigned char*) ptr;
39 for (
int i = size - 1;
i >= 0;
i--) {
41 sprintf(cStr,
"%02x",
byte);
42 outString.append(cStr);
49 std::string outString;
51 unsigned char* b = (
unsigned char*) ptr;
52 unsigned char byte[4];
53 byte[0] = b[3] & 0xff;
54 byte[1] = b[2] & 0xff;
55 byte[2] = b[1] & 0xff;
56 byte[3] = b[0] & 0xff;
61 sprintf(cStr,
"%02x%02x %02x%02x",
byte[0],
byte[1],
byte[2],
byte[3]);
63 outString.append(cStr);
69 std::string outString;
71 unsigned char* b = (
unsigned char*) ptr;
72 unsigned char byte[4];
73 byte[0] = b[0] & 0xff;
74 byte[1] = b[1] & 0xff;
75 byte[2] = b[2] & 0xff;
76 byte[3] = b[3] & 0xff;
81 sprintf(cStr,
"%02x%02x %02x%02x",
byte[0],
byte[1],
byte[2],
byte[3]);
83 outString.append(cStr);
89 unsigned char* b = (
unsigned char*) ptr;
90 unsigned char byte[4];
91 byte[0] = b[3] & 0xff;
92 byte[1] = b[2] & 0xff;
93 byte[2] = b[1] & 0xff;
94 byte[3] = b[0] & 0xff;
103 size_t nWords = size / 4;
106 for (
size_t iWord = 0; iWord < nWords; iWord++) {
116 std::cout << std::endl;
std::string GetBinaryRepresentation(size_t const size, uint8_t const *const ptr)
std::string GetWordHexRepr(uint8_t const *const ptr)
void PrintRaw(size_t const size, uint8_t const *const ptr)
void SwapBytes(size_t const size, uint8_t const *ptr)
std::string GetWordHexReprInv(uint8_t const *const ptr)
std::string GetHexRepresentation(size_t const size, uint8_t const *const ptr)