/* * SPDX-License-Identifier: CC0-1.0 * * Copyright (C) 2025 W. Kosior <koszko@koszko.org> */ #include <stdio.h> #include <sys/random.h> #include "pqcrypto_prng_getrandom.h" void prng_getrandom(void * buf, size_t buf_len, void * state) { (void) state; if (getrandom(buf, buf_len, 0) != (ssize_t) buf_len) { fprintf(stderr, "Failed to get %zu random bytes.\n", buf_len); abort(); } }