Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Windows CryptGenRandom function instead of RandomRange #3

Open
sikofitt opened this issue Apr 26, 2016 · 1 comment
Open

Use Windows CryptGenRandom function instead of RandomRange #3

sikofitt opened this issue Apr 26, 2016 · 1 comment
Assignees

Comments

@sikofitt
Copy link
Contributor

Use Windows CryptGenRandom function instead of RandomRange on line #L567 for Windows Platforms.

If you are generating passwords faster than .5 seconds, the salt will duplicate every other round. Hopefully nobody is generating mass password hashes from the same password. Can't think of a use case. (I'm sure there is one).

This is only affected if you generate a hash for the same password.

for i:= 0 to 10 do 
  begin
    TBCryptHash.CreateHash('password');
  end;

This will output something like :

  '$2y$10$kJgRFQ993paFLArmPE3gn.8yuUB/SRpaEw7lkJJ1oVqhWVIecI5nO'
  '$2y$10$kJgRFQ993paFLArmPE3gn.n9OJBeYd77RdOYnkdp9orILyaa5jDb6'
  '$2y$10$onWrpSgN3URAnmBJZkpqieH1QwbkDe5.RXInCYJG9MCtXL0yH6rxe'
@sikofitt sikofitt self-assigned this Apr 26, 2016
@sikofitt
Copy link
Contributor Author

sikofitt commented Aug 9, 2017

This repo is no longer being updated. See BCrypt in https://github.com/renegadebbs/Renegade.Hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant