From 6c38779e78ce5a99e0dd0529de1864e3886ddf8b Mon Sep 17 00:00:00 2001 From: CismonX Date: Thu, 19 Jun 2025 16:49:41 +0800 Subject: [PATCH] prng: debug-print seed if fetched from getrandom() --- src/prng.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/prng.c b/src/prng.c index 8cb41eb..811ceae 100644 --- a/src/prng.c +++ b/src/prng.c @@ -29,6 +29,7 @@ #include "prng.h" #include +#include #include #include @@ -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; }