12345678910111213141516171819202122232425(* This file is part of Dream, released under the MIT license. See LICENSE.md
for details, or visit https://github.com/aantron/dream.
Copyright 2021 Anton Bachin *)(* TODO LATER Is there something with lighter dependencies? Although perhaps
these are not so bad... *)let_initialized:unitlazy_toptionref=refNoneletinitialized()=match!_initializedwith|None->failwith"Entropy is not initialized."|Somev->Lazy.forcevletinitializef=_initialized:=Some(Lazy.from_funf)letrandom_buffern=initialized();Mirage_crypto_rng.generatenletrandomn=Cstruct.to_string(random_buffern)