aboutsummaryrefslogtreecommitdiff
path: root/src/mod_caps.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/mod_caps.erl')
-rw-r--r--src/mod_caps.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mod_caps.erl b/src/mod_caps.erl
index ae7998108..c001a696c 100644
--- a/src/mod_caps.erl
+++ b/src/mod_caps.erl
@@ -409,11 +409,11 @@ make_disco_hash(DiscoInfo, Algo) ->
concat_features(DiscoInfo), concat_info(DiscoInfo)]),
jlib:encode_base64(case Algo of
md5 -> erlang:md5(Concat);
- sha -> p1_sha:sha1(Concat);
- sha224 -> p1_sha:sha224(Concat);
- sha256 -> p1_sha:sha256(Concat);
- sha384 -> p1_sha:sha384(Concat);
- sha512 -> p1_sha:sha512(Concat)
+ sha -> crypto:hash(sha, Concat);
+ sha224 -> crypto:hash(sha224, Concat);
+ sha256 -> crypto:hash(sha256, Concat);
+ sha384 -> crypto:hash(sha384, Concat);
+ sha512 -> crypto:hash(sha512, Concat)
end).
-spec check_hash(caps(), disco_info()) -> boolean().