View Source bcrypt (bcrypt v1.2.2)
Link to this section Summary
Functions
Returns a random string data.
Generate a random string data.
Make hash string based on
Password
and Salt
.Is at least one bcrypt worker currently available for work?
Get environment setting of hash generation.
Link to this section Types
-type mechanism() :: nif | port.
-type pwerr() :: invalid_salt | invalid_salt_length | invalid_rounds.
-type rounds() :: 4..31.
Link to this section Functions
-spec gen_salt() -> Result when Result :: {ok, Salt}, Salt :: [byte()].
-spec gen_salt(Rounds) -> Result when Rounds :: rounds(), Result :: {ok, Salt}, Salt :: [byte()].
-spec hashpw(Password, Salt) -> Result when Password :: [byte()] | binary(), Salt :: [byte()] | binary(), Result :: {ok, Hash} | {error, ErrorDescription}, Hash :: [byte()], ErrorDescription :: pwerr().
Password
and Salt
.
-spec is_worker_available() -> Result when Result :: boolean().
-spec mechanism() -> mechanism().
Application
bcrypt
. See also:application:start/1.
Application
bcrypt
. See also:application:stop/1.