Use p1_rand:bytes instead of crypto to work in supported Erlang versions (#243)

This commit is contained in:
Badlop 2018-11-07 13:33:54 +01:00
parent 18be432fdf
commit 774cc46481
1 changed files with 1 additions and 1 deletions

View File

@ -132,7 +132,7 @@ password_to_scram(Password) ->
password_to_scram(#scram{} = Password, _) ->
Password;
password_to_scram(Password, IterationCount) ->
Salt = crypto:rand_bytes(?SALT_LENGTH),
Salt = p1_rand:bytes(?SALT_LENGTH),
SaltedPassword = salted_password(Password, Salt, IterationCount),
StoredKey = stored_key(scram2:client_key(SaltedPassword)),
ServerKey = server_key(SaltedPassword),