Skip to content

File syn_random.h

File List > src > syntropic > util > syn_random.h

Go to the documentation of this file

#ifndef SYN_RANDOM_H
#define SYN_RANDOM_H

#include "../common/syn_compiler.h"
#include "../common/syn_defs.h"

#include <stddef.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

SYN_Status syn_random_fill(void *buf, size_t len);

SYN_Status syn_random_fallback_fill(void *buf, size_t len);

uint32_t syn_random_u32(void);

uint32_t syn_random_range(uint32_t min, uint32_t max);

/* ── Porting Hook ───────────────────────────────────────────────────────── */

SYN_WEAK SYN_Status syn_port_random_fill(void *buf, size_t len);

#ifdef __cplusplus
}
#endif

#endif /* SYN_RANDOM_H */