Skip to content

Commit

Permalink
address @reynir review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Mar 11, 2024
1 parent 2521630 commit 1fad230
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rng/hmac_drbg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module Make (H : Digestif.S) = struct
let generate_into ~g buf ~off len =
if not g.seeded then raise Rng.Unseeded_generator ;
let rec go off k v = function
| 0 -> v (* unlikely this happens *)
| 0 -> v
| 1 ->
let v = H.hmac_string ~key:k v |> H.to_raw_string in
let len =
Expand Down
8 changes: 4 additions & 4 deletions rng/mirage_crypto_rng.mli
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ val unset_default_generator : unit -> unit
(** [unset_default_generator ()] sets the default generator to [None]. *)
(**/**)

val generate : ?g:g -> int -> string
(** Invoke {{!Generator.generate}generate} on [g] or
{{!generator}default generator}. *)

val generate_into : ?g:g -> bytes -> ?off:int -> int -> unit
(** Invoke {{!Generator.generate}generate} on [g] or
{{!generator}default generator}. The offset [off] defaults to 0. *)

val generate : ?g:g -> int -> string
(** Invoke {generate_into} on [g] or {{!generator}default generator} and a
freshly allocated bytes buffer that is converted to a string. *)

val block : g option -> int
(** {{!Generator.block}Block} size of [g] or
{{!generator}default generator}. *)
Expand Down

0 comments on commit 1fad230

Please sign in to comment.