package sodium
Module Sodium.Password_hash
type difficulty = {mem_limit : int64;(*The amount of memory used by the algorithm. The more memory the better.
*)ops_limit : int;(*The number of passes of the algorithm over the memory. The more passes the better, to be adjusted to the type of application.
*)
}Parameters of the primitive algorithm used to derive secret keys and hash passwords. This algorithm generates data (the secret key or the hash) from a human chosen password and a salt using a time and memory consuming algorithm to prevent bruteforce attacks.
val interactive : difficultyThe base line of difficulty, for online, interactive applications. Currently 3 passes over 32MiB.
val moderate : difficultyCurrently 6 passes and 128MiB.
val sensitive : difficultyFor highly sensitive data and non-interactive operations. Currently 8 passes over 512MiB. Takes about 3.5 seconds on a 2.8 Ghz Core i7 CPU.
val wipe_password : password -> unitwipe_password pw overwrites pw with zeroes.
val random_salt : unit -> saltrandom_salt () generates a random salt.
module type S = sig ... end