Fills a buffer with random bytes from the operating system.
Declared in <llvm/Support/RandomNumberGenerator.h>
std::error_code
getRandomBytes(
void* Buffer,
size_t Size);
On Windows this uses CryptGenRandom; elsewhere it reads from /dev/urandom. This is not the deterministic generator provided by RandomNumberGenerator.
A default-constructed error_code on success, or an error on failure.
| Name | Description |
|---|---|
| Buffer | Destination buffer to fill. |
| Size | Number of bytes to write into Buffer. |