From: Holger Weiss Date: Sat, 21 Mar 2015 21:56:23 +0000 (+0100) Subject: Avoid crypto:hmac/3 call for R15B compatibility X-Git-Tag: 15.04~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31e356c126cd5b967df9e7b560ce63f2b3b1529b;p=ejabberd Avoid crypto:hmac/3 call for R15B compatibility --- diff --git a/src/scram.erl b/src/scram.erl index 3069be466..8c7935210 100644 --- a/src/scram.erl +++ b/src/scram.erl @@ -86,4 +86,6 @@ hi_round(Password, UPrev, IterationCount) -> IterationCount - 1)))). sha_mac(Key, Data) -> - crypto:hmac(sha, Key, Data). + Context1 = crypto:hmac_init(sha, Key), + Context2 = crypto:hmac_update(Context1, Data), + crypto:hmac_final(Context2).