SCRAM--SHA-256 helper functions
nonce() = binary()
server_first() = [{nonce, nonce()} | {salt, binary()} | {i, pos_integer()} | {raw, binary()}]
bin_xor/2 | |
get_client_final/4 | |
get_client_first/2 | |
get_nonce/1 | Generate unique ASCII string. |
h/1 | |
hi/3 | |
hmac/2 | |
parse_server_final/1 | |
parse_server_first/2 |
bin_xor(B1, B2) -> any()
get_client_final(SrvFirst::server_first(), ClientNonce::nonce(), UserName::iodata(), Password::iodata()) -> {ClientFinal::iodata(), ServerSignature::binary()}
get_client_first(UserName::iodata(), Nonce::nonce()) -> iodata()
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(Str) -> any()
hi(Str, Salt, I) -> any()
hmac(Key, Str) -> any()
parse_server_final(X1::binary()) -> {ok, binary()} | {error, binary()}
parse_server_first(ServerFirst::binary(), ClientNonce::nonce()) -> server_first()
Generated by EDoc