mirror of
https://github.com/urbit/shrub.git
synced 2024-11-29 14:57:12 +03:00
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("");
|
||
|
}
|