summaryrefslogtreecommitdiff
path: root/vere/pkg/ent/tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'vere/pkg/ent/tests.c')
-rw-r--r--vere/pkg/ent/tests.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/vere/pkg/ent/tests.c b/vere/pkg/ent/tests.c
new file mode 100644
index 0000000..90b6ca0
--- /dev/null
+++ b/vere/pkg/ent/tests.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "ent.h"
+
+int main(void) {
+ char buf[256] = {0};
+
+ if (0 != ent_getentropy(buf, sizeof(buf))) {
+ perror("getentropy");
+ exit(1);
+ }
+
+ for (int i = 0; i < sizeof buf; i++) {
+ printf("%02hhx", buf[i]);
+ }
+
+ puts("");
+}