mirror of
https://github.com/urbit/shrub.git
synced 2024-12-22 10:21:31 +03:00
ce933a6c5c
- The header is now less brittle, and is the same thing everywhere. - Lots of stuff is cleaned up and simpler. - Changed copyright year.
25 lines
323 B
C
25 lines
323 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
#include <ent.h>
|
|
|
|
|
|
int
|
|
main()
|
|
{
|
|
char buf[256];
|
|
int i;
|
|
|
|
memset(buf, 0, sizeof(buf));
|
|
if (0 != ent_getentropy(buf, sizeof(buf))) {
|
|
perror("getentropy");
|
|
exit(1);
|
|
}
|
|
for (i = 0; i < sizeof buf; ++i) {
|
|
printf("%02hhx", buf[i]);
|
|
}
|
|
puts("");
|
|
return 0;
|
|
}
|