package argon2

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

Bindings to Argon2i.

type hash
type encoded
val hash_raw : t_cost:int -> m_cost:int -> parallelism:int -> pwd:string -> salt:string -> hash_len:int -> (hash, ErrorCodes.t) Result.result

Hashes a password with Argon2i, producing a raw hash.

val hash_encoded : t_cost:int -> m_cost:int -> parallelism:int -> pwd:string -> salt:string -> hash_len:int -> encoded_len:int -> (encoded, ErrorCodes.t) Result.result

Hashes a password with Argon2i, producing an encoded hash.

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

Verifies a password against an encoded string.

val hash_to_string : hash -> string

Converts a raw hash value to a string.

val encoded_to_string : encoded -> string

Converts an encoded hash to a string.

OCaml

Innovation. Community. Security.