View Source fast_scram (fast_scram v0.6.0)

Summary

Types

-type challenge() :: #challenge{}.
-type channel_binding() :: #channel_binding{}.
-type configuration() :: map().
-type error_message() :: binary().
-type fast_scram_state() :: #fast_scram_state{}.
-type final_message() :: binary().
-type next_message() :: binary().
-type nonce() :: #nonce{}.
-type parse_return() :: {ok, fast_scram_state()} | {skip_rule, fast_scram_state()} | {error, binary()}.
-type plus_variant() :: undefined | none | binary().
-type scram_definitions() :: #scram_definitions{}.
-type sha_type() :: crypto:sha1() | crypto:sha2().
-type username() :: binary().
-type username_to_config() :: fun((username()) -> configuration()).
-type username_to_state() ::
    fun((username(), fast_scram_state()) -> {configuration(), fast_scram_state()}).

Functions

Link to this function

client_key(Sha, SaltedPassword)

View Source
-spec client_key(sha_type(), binary()) -> binary().
Link to this function

client_proof(ClientKey, ClientSignature)

View Source
-spec client_proof(binary(), binary()) -> binary().
Link to this function

client_signature(Sha, StoredKey, AuthMessage)

View Source
-spec client_signature(sha_type(), binary(), binary()) -> binary().
Link to this function

hi(Hash, Password, Salt, IterationCount)

View Source
-spec hi(sha_type(), binary(), binary(), non_neg_integer()) -> binary().
Link to this function

mech_get(Key, Fast_scram_state)

View Source
-spec mech_get(term(), fast_scram_state()) -> term().
Link to this function

mech_get(Key, Fast_scram_state, Default)

View Source
-spec mech_get(term(), fast_scram_state(), term()) -> term().
-spec mech_new(configuration()) -> {ok, fast_scram_state()} | {error, term()}.
Link to this function

mech_set(Key, Value, Fast_scram_state)

View Source
-spec mech_set(term(), term(), fast_scram_state()) -> fast_scram_state().
Link to this function

mech_step(Fast_scram_state, ServerIn)

View Source
-spec mech_step(fast_scram_state(), binary()) ->
             {ok, final_message(), fast_scram_state()} |
             {continue, next_message(), fast_scram_state()} |
             {error, error_message(), fast_scram_state()}.
Link to this function

salted_password(Sha, Password, Salt, IterationCount)

View Source
-spec salted_password(sha_type(), binary(), binary(), non_neg_integer()) -> binary().
Link to this function

server_key(Sha, SaltedPassword)

View Source
-spec server_key(sha_type(), binary()) -> binary().
Link to this function

server_signature(Sha, ServerKey, AuthMessage)

View Source
-spec server_signature(sha_type(), binary(), binary()) -> binary().
Link to this function

stored_key(Sha, ClientKey)

View Source
-spec stored_key(sha_type(), binary()) -> binary().