Passe.BcryptThe bcrypt hashing algorithm.
type error = [ | `Hash_failure| `Invalid_cost of string| `Invalid_hash of string| `Invalid_prefix of string| `Invalid_salt_length of int| `Salt_generation_failure| `Truncated of int ]Errors that can occur during hashing and verification.
val pp_error : Stdlib.Format.formatter -> error -> unitval hash_with_salt :
salt:string ->
string ->
(Passe__.Hash.t, error) Stdlib.resulthash_with_salt ~salt s hash s password with the given salt and params.
hash_with_salt_exn ~salt ~params s is the same as hash_with_salt ~salt ~params s but raises Invalid_argument s on error.
val hash : ?cost:int -> string -> (Passe__.Hash.t, error) Stdlib.resulthash ?cost s hash s password with a randomly generated salt and the given cost (or default cost if not provided).
hash_exn ?cost s is the same as hash ?cost s but raises Invalid_argument s on error.
val verify : hash:Passe__.Hash.t -> string -> (bool, error) Stdlib.resultverify ~hash s verifies that s matches the given hash.