Skip to content

Commit

Permalink
fix: initialize rng
Browse files Browse the repository at this point in the history
  • Loading branch information
leostera authored and joseferben committed Nov 20, 2023
1 parent a82fcfd commit 56ce27c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sihl/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
(libraries sexplib fmt fmt.tty logs logs.fmt lwt lwt.unix tsort conformist
base64 yojson ppx_deriving_yojson.runtime safepass ptime ptime.clock.os
jwto uuidm opium caqti-lwt caqti-lwt.unix str dune-build-info bos
containers mirage-crypto mirage-crypto-rng cstruct)
containers mirage-crypto mirage-crypto-rng mirage-crypto-rng.unix cstruct)
(preprocess
(pps ppx_fields_conv ppx_deriving_yojson ppx_deriving.eq ppx_deriving.show
ppx_deriving.make ppx_sexp_conv lwt_ppx)))
Expand Down
1 change: 1 addition & 0 deletions sihl/src/web_csrf.ml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ let set token req =
*)

module Crypto = struct
let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna)
let block_size = 16

(** [token_length] is the amount of bytes used in the unencrypted CSRF tokens. *)
Expand Down

0 comments on commit 56ce27c

Please sign in to comment.