argon2
  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Ocaml bindings to Argon2.

module Argon2_type : sig ... end
module Argon2_version : sig ... end
module Argon2_ErrorCodes : sig ... end
type hash = string
type encoded = string
module I : sig ... end
module D : sig ... end
val hash : t_cost:int -> m_cost:int -> parallelism:int -> pwd:string -> salt:string -> typ:Argon2_type.t -> hash_len:int -> encoded_len:int -> version:Argon2_version.t -> (hash * encoded, Argon2_ErrorCodes.t) Result.result

Generic function underlying the above ones.

val verify : encoded:encoded -> pwd:string -> typ:Argon2_type.t -> (bool, Argon2_ErrorCodes.t) Result.result

Verifies a password against an encoded string.

val encoded_len : t_cost:int -> m_cost:int -> parallelism:int -> salt_len:int -> hash_len:int -> int

Returns the encoded hash length for the given input parameters.