mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-07-02 23:38:51 +00:00
prng: debug-print seed if fetched from getrandom()
This commit is contained in:
parent
72d55ed68f
commit
6c38779e78
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
|||
#include "prng.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/random.h>
|
||||
|
@ -89,5 +90,8 @@ prng_seed (
|
|||
// as many bytes as requested.
|
||||
// This is guaranteed on both Linux and FreeBSD.
|
||||
debug_assert(nbytes == sizeof(state));
|
||||
debug_printf("prng seed: "
|
||||
"%016" PRIx64 "%016" PRIx64 "%016" PRIx64 "%016" PRIx64,
|
||||
state[0], state[1], state[2], state[3]);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue