antelle / argon2-browser

Argon2 library compiled for browser runtime
https://antelle.net/argon2-browser
MIT License
383 stars 81 forks source link

Progress Indicator #71

Closed jdspugh closed 3 years ago

jdspugh commented 3 years ago

This library works well, thanks. It would be even better with a way to retrieve the computation's progress from Javascript.

antelle commented 3 years ago

There's no such option. What you can, however, do, is:

  1. set the iterations to 1
  2. compute the hash
  3. multiply this time by the number of iterations
  4. calculate the progress based on that
jdspugh commented 3 years ago

That's a good suggestion, but the parameters that work best for me are 1GB memory to maximise the memory complexity and one iteration. The user will have to wait for now.

antelle commented 3 years ago

In this case it would be also complicated to report progress. I see how the reporting events can be added between iterations, but inside one round not sure.