mirror of
https://github.com/wolfcw/libfaketime.git
synced 2026-05-17 08:36:28 +03:00
15 lines
273 B
C
15 lines
273 B
C
#include <unistd.h>
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
unsigned char buf[16];
|
|
if (getentropy(buf, sizeof(buf))) {
|
|
perror("failed to getentropy()");
|
|
return 1;
|
|
}
|
|
for (size_t i = 0; i < sizeof(buf); i++)
|
|
printf("%02x", buf[i]);
|
|
printf("\n");
|
|
return 0;
|
|
}
|