summaryrefslogtreecommitdiff
path: root/vere/pkg/ent/ent.h
diff options
context:
space:
mode:
Diffstat (limited to 'vere/pkg/ent/ent.h')
-rw-r--r--vere/pkg/ent/ent.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/vere/pkg/ent/ent.h b/vere/pkg/ent/ent.h
new file mode 100644
index 0000000..e838d61
--- /dev/null
+++ b/vere/pkg/ent/ent.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include <stddef.h>
+
+/*
+ Fills buf with high-quality entropy.
+
+ buflen is the number of bytes, no greater than 256.
+
+ Returns 0 on success. On failure, returns -1 and sets errno to
+ indicate the error.
+*/
+int ent_getentropy(void* buf, size_t buflen);