Skip to content

Commit 150ce0d

Browse files
author
Santiago Palladino
committed
Fixed order of params in crypto hash function
1 parent 1b26e45 commit 150ce0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mysql_auth.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ bxor_binary(B1, B2) ->
175175
password_new([], _Salt) ->
176176
<<>>;
177177
password_new(Password, Salt) ->
178-
Stage1 = crypto:hash(Password, sha),
179-
Stage2 = crypto:hash(Stage1, sha),
178+
Stage1 = crypto:hash(sha, Password),
179+
Stage2 = crypto:hash(sha, Stage1),
180180
Res = crypto:hash_final(
181181
crypto:hash_update(
182182
crypto:hash_update(crypto:hash_init(sha), Salt),

0 commit comments

Comments
 (0)