mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-23 20:15:19 -07:00
One more safe arc4random() implementation
This commit is contained in:
parent
6a83cd05ec
commit
0f1c303bf1
@ -74,7 +74,7 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);
|
|||||||
|
|
||||||
#define INTERNAL_RANDOM_BLOCK_SIZE crypto_core_hchacha20_OUTPUTBYTES
|
#define INTERNAL_RANDOM_BLOCK_SIZE crypto_core_hchacha20_OUTPUTBYTES
|
||||||
|
|
||||||
#if defined(__OpenBSD__) || defined(__CloudABI__)
|
#if defined(__OpenBSD__) || defined(__CloudABI__) || defined(__wasi__)
|
||||||
# define HAVE_SAFE_ARC4RANDOM 1
|
# define HAVE_SAFE_ARC4RANDOM 1
|
||||||
#endif
|
#endif
|
||||||
#if defined(__CloudABI__) || defined(__wasm__)
|
#if defined(__CloudABI__) || defined(__wasm__)
|
||||||
|
@ -72,7 +72,7 @@ BOOLEAN NTAPI RtlGenRandom(PVOID RandomBuffer, ULONG RandomBufferLength);
|
|||||||
# pragma comment(lib, "advapi32.lib")
|
# pragma comment(lib, "advapi32.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__OpenBSD__) || defined(__CloudABI__)
|
#if defined(__OpenBSD__) || defined(__CloudABI__) || defined(__wasi__)
|
||||||
# define HAVE_SAFE_ARC4RANDOM 1
|
# define HAVE_SAFE_ARC4RANDOM 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -375,7 +375,7 @@ randombytes_sysrandom(void)
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __OpenBSD__ */
|
#endif /* HAVE_SAFE_ARC4RANDOM */
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
randombytes_sysrandom_implementation_name(void)
|
randombytes_sysrandom_implementation_name(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user