aboutsummaryrefslogtreecommitdiffstats
path: root/ext/util/util.h
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2025-10-30 23:29:08 +0100
committerGravatar Tim Segers <tsegers@pm.me>2025-11-01 10:24:48 +0100
commit945f3a935d85d55c23d5cfe4b98b064532dc6bcd (patch)
treeb08f0656671c23b191ff3d5be3a309fd9d62d8b5 /ext/util/util.h
parentc52ae66fa564fef0e55b5b80f0fd65679daf5abc (diff)
downloadtweetpipe-945f3a935d85d55c23d5cfe4b98b064532dc6bcd.tar.gz
Replace libhydrogen by tweetnacl and tweetpwhash
Diffstat (limited to 'ext/util/util.h')
-rw-r--r--ext/util/util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/util/util.h b/ext/util/util.h
new file mode 100644
index 0000000..c67972e
--- /dev/null
+++ b/ext/util/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 */