1234567891011121314151617181920 |
- (* https://raw.githubusercontent.com/aantron/dream/8612f6a661053ba4e0800c9c6c7f39bdefd5f9eb/src/cipher/random.ml *)
- (* 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... *)
- (* API change in mirage-crypto-rng 1.0
- FreeBSD ocaml-lsp-server https://github.com/ocaml/ocaml-lsp/issues/1069#issuecomment-2376511874
- *)
- let random_buffer = Mirage_crypto_rng.generate
- let random n =
- n
- |> random_buffer
- |> Cstruct.to_string
|