Module Argon2.I

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, 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, 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.