View Source bcrypt_port (bcrypt v1.2.1)

Implementation of gen_server behaviour.

Link to this section Summary

Link to this section Types

-type state() ::
    #state{port :: port(),
           default_log_rounds :: non_neg_integer(),
           cmd_from :: {pid(), term()} | undefined}.

Link to this section Functions

Link to this function

code_change(OldVsn, State, Extra)

View Source
-spec gen_salt(Pid) -> Result when Pid :: pid(), Result :: {ok, Salt}, Salt :: [byte()].
Link to this function

gen_salt(Pid, LogRounds)

View Source
-spec gen_salt(Pid, LogRounds) -> Result
            when
                Pid :: pid(), LogRounds :: bcrypt:rounds(), Result :: {ok, Salt}, Salt :: [byte()].
Link to this function

hashpw(Pid, Password, Salt)

View Source
-spec hashpw(Pid, Password, Salt) -> Result
          when Pid :: pid(), Password :: [byte()], Salt :: [byte()], Result :: [byte()].
-spec start_link() -> Result
              when
                  Result :: {ok, Pid} | ignore | {error, Error},
                  Pid :: pid(),
                  Error :: {already_started, Pid} | term(),
                  Pid :: pid().
-spec stop() -> Result when Result :: {stop, normal, ok, state()}.