(claude) generated some general crypto headers I was too lazy to do myself

This commit is contained in:
2026-11-26 20:25:43 +01:00
parent aafd55c2ef
commit e84550d746
12 changed files with 423 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
// 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 <stddef.h>
#include <stdint.h>
#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