diff options
Diffstat (limited to 'ext/util.h')
| -rw-r--r-- | ext/util.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/util.h b/ext/util.h new file mode 100644 index 0000000..c67972e --- /dev/null +++ b/ext/util.h @@ -0,0 +1,13 @@ +#ifndef UTIL_H +#define UTIL_H + +#include <stdint.h> +#include <sys/types.h> + +int bin2hex(char *hex, size_t hexsize, const uint8_t *bin, size_t binlen); +int hex2bin(uint8_t *bin, size_t binsize, const char *hex, size_t hexlen); + +void randombytes(uint8_t *buf, uint64_t n); +void memzero(void *ptr, size_t num); + +#endif /* end of include guard: UTIL_H */ |