(claude) generated some general crypto headers I was too lazy to do myself
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user