package sihl

  1. Overview
  2. Docs

Source file contract_random.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
let name = "random"

module type Sig = sig
  (** [base64 n] returns a Base64 encoded string containing [n] random bytes.
      This does not mean that the string contains [n] characters!. *)
  val base64 : int -> string

  (** [bytes n] returns a byte sequence as string with [n] random bytes. In most
      cases you want to use {!base64} to get a string that can be used safely in
      most web contexts. This does not mean that the string contains [n]
      characters!.*)
  val bytes : int -> string

  val register : unit -> Core_container.Service.t

  include Core_container.Service.Sig
end
OCaml

Innovation. Community. Security.