blob: a5d9e6daa9d0d9a528ddc1fa58fb65c300e8d383 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef MISC_H
#define MISC_H
#include <stdio.h>
#include <string>
namespace nitrokey {
namespace misc {
template <typename T>
typename T::CommandPayload get_payload(){
//Create, initialize and return by value command payload
typename T::CommandPayload st;
bzero(&st, sizeof(st));
return st;
}
std::string hexdump(const char *p, size_t size);
uint32_t stm_crc32(const uint8_t *data, size_t size);
}
}
#endif
|