aboutsummaryrefslogtreecommitdiffstats
path: root/ext/util.h
diff options
context:
space:
mode:
authorGravatar Tim Segers <tsegers@pm.me>2025-10-30 23:37:15 +0100
committerGravatar Tim Segers <tsegers@pm.me>2025-11-01 10:24:56 +0100
commit0aecf90263a2548c5d31c7bce6b978245e2ca16e (patch)
treedcb04f1bcfe1f3d287b91d255049c80ddd8c2099 /ext/util.h
parentbdb43c486b1f5dbd8eedf866b4161b31f1e5d75a (diff)
downloadtweetpipe-0aecf90263a2548c5d31c7bce6b978245e2ca16e.tar.gz
Deduce ext depth
Diffstat (limited to 'ext/util.h')
-rw-r--r--ext/util.h13
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 */