Module epgsql_scram

SCRAM--SHA-256 helper functions.

Description

SCRAM--SHA-256 helper functions

Data Types

nonce()

nonce() = binary()

server_first()

server_first() = [{nonce, nonce()} | {salt, binary()} | {i, pos_integer()} | {raw, binary()}]

Function Index

bin_xor/2
get_client_final/4
get_client_first/2
get_nonce/1Generate unique ASCII string.
h/1
hi/3
hmac/2
parse_server_final/1
parse_server_first/2

Function Details

bin_xor/2

bin_xor(B1, B2) -> any()

get_client_final/4

get_client_final(SrvFirst::server_first(), ClientNonce::nonce(), UserName::iodata(), Password::iodata()) -> {ClientFinal::iodata(), ServerSignature::binary()}

get_client_first/2

get_client_first(UserName::iodata(), Nonce::nonce()) -> iodata()

get_nonce/1

get_nonce(NumRandomBytes::pos_integer()) -> nonce()

Generate unique ASCII string. Resulting string length isn't guaranteed, but it's guaranteed to be unique and will contain NumRandomBytes of random data.

h/1

h(Str) -> any()

hi/3

hi(Str, Salt, I) -> any()

hmac/2

hmac(Key, Str) -> any()

parse_server_final/1

parse_server_final(X1::binary()) -> {ok, binary()} | {error, binary()}

parse_server_first/2

parse_server_first(ServerFirst::binary(), ClientNonce::nonce()) -> server_first()


Generated by EDoc