diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 17:39:20 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 17:39:20 -0400 |
| commit | 2538b1b7461f9b06d6a6f43acd5609d916b1addc (patch) | |
| tree | 061efdfc54351b1c644f1422e4f2c00bfefb1235 /lib/random/sysrandom.h | |
| parent | d6d3f5711de85ab1c21f515b9d125d316d853c92 (diff) | |
| parent | adc2d81b5683e611c5f3289be6157d4519a60632 (diff) | |
Merge branch 'main' into formatter
Diffstat (limited to 'lib/random/sysrandom.h')
| -rw-r--r-- | lib/random/sysrandom.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/random/sysrandom.h b/lib/random/sysrandom.h deleted file mode 100644 index 3d6b800f..00000000 --- a/lib/random/sysrandom.h +++ /dev/null @@ -1,17 +0,0 @@ -// Logic for using system random numbers - -#pragma once - -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) -#include <stdlib.h> -static ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) { - (void)flags; - arc4random_buf(buf, buflen); - return buflen; -} -#elif defined(__linux__) -// Use getrandom() -#include <sys/random.h> -#else -#error "Unsupported platform for secure random number generation" -#endif |
