// rng.h // Library initialization and randomness. // // The one documented sans-IO exception: randomness comes from the OS through libsodium. #ifndef BRAVAIS_RNG_H #define BRAVAIS_RNG_H #include #include #include "bravais.h" // Initialize the crypto backends. Idempotent and thread-safe; call before any other crypto/ function. bravais_result_t bravais_crypto_init(void); // Fill buf with len cryptographically secure random bytes. Cannot fail once initialized. void bravais_random_bytes(uint8_t* buf, size_t len); #endif // BRAVAIS_RNG_H