summaryrefslogtreecommitdiff
path: root/src/scram.erl
diff options
context:
space:
mode:
authorPeter Lemenkov <lemenkov@gmail.com>2017-02-13 18:35:57 +0300
committerPeter Lemenkov <lemenkov@gmail.com>2017-02-13 18:42:50 +0300
commite7733ce7d97376bf41d0c683ce3888838a7ea985 (patch)
treeb5151424a014b0697a0f7663d54fc22e588faf09 /src/scram.erl
parentCheck result of gen_mod:start/2 callback (#1534) (diff)
Use crypto:hash/2 function
Use crypto:hash/2 function instead of ones from p1_sha. This function exists since commit erlang/otp@208f9ad3828313f6c659a501d53f5534ec1bdf2e and also implemented as NIF, so I believe it's safe to use it. Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Diffstat (limited to 'src/scram.erl')
-rw-r--r--src/scram.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scram.erl b/src/scram.erl
index ee796047..f2875e4a 100644
--- a/src/scram.erl
+++ b/src/scram.erl
@@ -45,7 +45,7 @@ client_key(SaltedPassword) ->
-spec stored_key(binary()) -> binary().
-stored_key(ClientKey) -> p1_sha:sha1(ClientKey).
+stored_key(ClientKey) -> crypto:hash(sha, ClientKey).
-spec server_key(binary()) -> binary().