Idris2Doc : Crypto.BCrypt.FFI

Crypto.BCrypt.FFI

(source)

Definitions

prim__bcryptGenSalt : Bits8->PrimIOString
  Generate a new bcrypt salt.

The supplied cost factor should be between 4 and 31 inclusive.

Values outside this range are handled according to the underlying libbcrypt implementation.
prim__bcryptHash : String->Bits8->PrimIOString
  Hash a password using a newly generated bcrypt salt.

The supplied cost factor should be between 4 and 31 inclusive.

Values outside this range are handled according to the underlying libbcrypt implementation.
prim__bcryptHashWithSalt : String->String->PrimIOString
  Hash a password using an existing bcrypt salt or bcrypt hash.

The supplied salt may either be a bcrypt salt or a previously generated bcrypt hash.

When a hash is supplied, its embedded salt is reused.
prim__bcryptValidate : String->String->PrimIOInt
  Validate a password against a bcrypt hash.

Returns:
- 1 if the password matches.
- 0 otherwise.