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
-spec client_key(sha_type(), binary()) -> binary().
-spec client_proof(binary(), binary()) -> binary().
-spec client_signature(sha_type(), binary(), binary()) -> binary().
-spec hi(sha_type(), binary(), binary(), non_neg_integer()) -> binary().
-spec mech_get(term(), fast_scram_state()) -> term().
-spec mech_get(term(), fast_scram_state(), term()) -> term().
-spec mech_new(configuration()) -> {ok, fast_scram_state()} | {error, term()}.
-spec mech_set(term(), term(), fast_scram_state()) -> fast_scram_state().
-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()}.
-spec salted_password(sha_type(), binary(), binary(), non_neg_integer()) -> binary().
-spec server_key(sha_type(), binary()) -> binary().
-spec server_signature(sha_type(), binary(), binary()) -> binary().
-spec stored_key(sha_type(), binary()) -> binary().