package argon2

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

Module Argon2Source

Ocaml bindings to Argon2.

Sourcemodule ErrorCodes : sig ... end
Sourcemodule type HashFunctions = sig ... end

Bindings to Argon2i.

Bindings to Argon2d.

Bindings to Argon2id.

Sourcetype hash = string
Sourcetype encoded = string
Sourcetype kind =
  1. | D
  2. | I
  3. | ID
Sourceval show_kind : [ `Upper | `Lower ] -> kind -> string
Sourcetype version =
  1. | VERSION_10
  2. | VERSION_13
  3. | VERSION_NUMBER
    (*

    Currently an alias for VERSION_13

    *)
Sourceval hash : t_cost:int -> m_cost:int -> parallelism:int -> pwd:string -> salt:string -> kind:kind -> hash_len:int -> encoded_len:int -> version:version -> (hash * encoded, ErrorCodes.t) Result.result

Generic function underlying the above ones.

Sourceval verify : encoded:encoded -> pwd:string -> kind:kind -> (bool, ErrorCodes.t) Result.result

Verifies a password against an encoded string.

Sourceval encoded_len : t_cost:int -> m_cost:int -> parallelism:int -> salt_len:int -> hash_len:int -> kind:kind -> int

Returns the encoded hash length for the given input parameters.

OCaml

Innovation. Community. Security.