DigestURI = proplists_get_bin_value(<<"digest-uri">>, KeyVals, <<>>),
NC = proplists_get_bin_value(<<"nc">>, KeyVals, <<>>),
QOP = proplists_get_bin_value(<<"qop">>, KeyVals, <<>>),
- MD5Hash = crypto:md5(<<User/binary, ":", Realm/binary, ":",
+ MD5Hash = erlang:md5(<<User/binary, ":", Realm/binary, ":",
Passwd/binary>>),
A1 = case AuthzId of
<<"">> ->
<<A2Prefix/binary, ":", DigestURI/binary,
":00000000000000000000000000000000">>
end,
- T = <<(hex((crypto:md5(A1))))/binary, ":", Nonce/binary,
+ T = <<(hex((erlang:md5(A1))))/binary, ":", Nonce/binary,
":", NC/binary, ":", CNonce/binary, ":", QOP/binary,
- ":", (hex((crypto:md5(A2))))/binary>>,
- hex((crypto:md5(T))).
+ ":", (hex((erlang:md5(A2))))/binary>>,
+ hex((erlang:md5(T))).
Allow = case StateData#state.key of
<<"">> -> true;
OldKey ->
- NextKey = jlib:encode_base64((crypto:sha(Key))),
+ NextKey = jlib:encode_base64((p1_sha:sha1(Key))),
if OldKey == NextKey -> true;
true -> false
end
io_lib:format("~.16b", [N])
end,
binary_to_list(
- crypto:md5(
+ erlang:md5(
[SPort, IPS, atom_to_list(NetProt)])))),
{Port, SPort, IPT, IPS, SSPort, NetProt, OptsClean}.
Concat = list_to_binary([concat_identities(DiscoEls),
concat_features(DiscoEls), concat_info(DiscoEls)]),
jlib:encode_base64(case Algo of
- md5 -> crypto:md5(Concat);
- sha1 -> crypto:sha(Concat);
+ md5 -> erlang:md5(Concat);
+ sha1 -> p1_sha:sha1(Concat);
sha224 -> p1_sha:sha224(Concat);
sha256 -> p1_sha:sha256(Concat);
sha384 -> p1_sha:sha384(Concat);
-spec stored_key(binary()) -> binary().
-stored_key(ClientKey) -> crypto:sha(ClientKey).
+stored_key(ClientKey) -> p1_sha:sha1(ClientKey).
-spec server_key(binary()) -> binary().
DigestURI, NC, QOP, A2Prefix) ->
A1 = case AuthzId of
<<"">> ->
- <<((crypto:md5(<<User/binary, ":", Realm/binary, ":",
+ <<((erlang:md5(<<User/binary, ":", Realm/binary, ":",
Passwd/binary>>)))/binary,
":", Nonce/binary, ":", CNonce/binary>>;
_ ->
- <<((crypto:md5(<<User/binary, ":", Realm/binary, ":",
+ <<((erlang:md5(<<User/binary, ":", Realm/binary, ":",
Passwd/binary>>)))/binary,
":", Nonce/binary, ":", CNonce/binary, ":",
AuthzId/binary>>
<<A2Prefix/binary, ":", DigestURI/binary,
":00000000000000000000000000000000">>
end,
- T = <<(hex((crypto:md5(A1))))/binary, ":", Nonce/binary,
+ T = <<(hex((erlang:md5(A1))))/binary, ":", Nonce/binary,
":", NC/binary, ":", CNonce/binary, ":", QOP/binary,
- ":", (hex((crypto:md5(A2))))/binary>>,
- hex((crypto:md5(T))).
+ ":", (hex((erlang:md5(A2))))/binary>>,
+ hex((erlang:md5(T))).
my_jid(Config) ->
jlib:make_jid(?config(user, Config),