]> granicus.if.org Git - ejabberd/commitdiff
Avoid crypto:hmac/3 call for R15B compatibility
authorHolger Weiss <holger@zedat.fu-berlin.de>
Sat, 21 Mar 2015 21:56:23 +0000 (22:56 +0100)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Sat, 21 Mar 2015 21:56:23 +0000 (22:56 +0100)
src/scram.erl

index 3069be4666c41c0050e392775295cca1324e28c5..8c79352107c375a7dcb00567ce23cc35548d5a15 100644 (file)
@@ -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).