mirror of
https://github.com/urbit/shrub.git
synced 2024-11-24 13:06:09 +03:00
9618f37965
git-subtree-dir: pkg/ent git-subtree-mainline:1207c204cb
git-subtree-split:31ac2913f1
21 lines
324 B
C
21 lines
324 B
C
#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("");
|
|
}
|