Module Hacl_star__Hacl.RandomBuffer
A randomness function implemented with platform-dependent code for Unix and Windows
The randombytes
function is handwritten, unverified C code. In Unix, it is implemented using the getrandom
syscall, with a fallback to /dev/urandom
. In Windows, it is implemented using CryptGenRandom
.
val randombytes : size:int -> bytes option
randombytes size
attempts to create a buffer containingsize
random bytes
module Noalloc : sig ... end
Version of this function which writes its output in a buffer passed in as an argument