summaryrefslogtreecommitdiff
path: root/vere/pkg/ent/tests.c
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-10-06 01:01:41 +0700
committerpolwex <polwex@sortug.com>2025-10-06 01:01:41 +0700
commitc4b392a179048f936c062f5ffccc2bc25627e500 (patch)
tree09be0904be8ec4d7ea52992ef7580d42ed0c28c1 /vere/pkg/ent/tests.c
working
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("");
+}