ligo/vendors/ocaml-pbkdf/src/pbkdf.mli

15 lines
622 B
OCaml
Raw Normal View History

2018-02-16 17:33:10 +04:00
(** {{:https://tools.ietf.org/html/rfc2898}RFC 2898} specifies two password-based
key derivation functions (PBKDF1 and PBKDF2), which are abstracted over
a specific hash/pseudorandom function. *)
module type S = sig
(** [pbkdf2 password salt count dk_len] is [dk], the derived key of [dk_len] octets.
@raise Invalid_argument when either [count] or [dk_len] are not valid *)
2018-07-02 13:21:52 +04:00
val pbkdf2 : password:Bigstring.t -> salt:Bigstring.t -> count:int -> dk_len:int32 -> Bigstring.t
2018-02-16 17:33:10 +04:00
end
(** Given a Hash/pseudorandom function, get the PBKDF *)
2018-07-02 13:21:52 +04:00
module Make (H: Hacl.Hash.S) : S
2018-02-16 17:33:10 +04:00
2018-07-02 13:21:52 +04:00
module SHA256 : S
module SHA512 : S