View Source bcrypt_nif_worker (bcrypt v1.2.1)
gen_server
behaviour.
Link to this section Summary
Functions
Returns bcrypt salt.
Returns bcrypt salt.
Make hash string based on
Password
and Salt
.Creates a
gen_server
process as part of a supervision tree.Link to this section Types
-type state() :: #state{default_log_rounds :: integer(), context :: term()}.
Link to this section Functions
-spec gen_salt() -> Result when Result :: [byte()].
-spec gen_salt(Rounds) -> Result when Rounds :: bcrypt:rounds(), Result :: [byte()].
-spec hashpw(Password, Salt) -> Result when Password :: [byte()] | binary(), Salt :: [byte()] | binary(), Result :: {ok, Hash} | {error, ErrorDescription}, Hash :: [byte()], ErrorDescription :: bcrypt:pwerr().
Password
and Salt
.
-spec start_link(Args) -> Result
when
Args :: term(),
Result :: {ok, Pid} | ignore | {error, Error},
Pid :: pid(),
Error :: {already_started, Pid} | term().
gen_server
process as part of a supervision tree.