dchest / scrypt-async-js

Fast "async" scrypt implementation in JavaScript
http://dchest.github.io/scrypt-async-js/
BSD 2-Clause "Simplified" License
140 stars 26 forks source link

synchronous version? #4

Closed fruiz500 closed 9 years ago

fruiz500 commented 9 years ago

I really like this code, but I want to use it in a program where the KDF needs to be called several times for different strings. Waiting is a plus, since I want to encourage users to use high-entropy passwords, and I add rounds of KDF for low entropy.

Is there a way to use your function synchronously, without callbacks?

dchest commented 9 years ago

Answered here: https://github.com/dchest/tweetnacl-js/issues/68

FYI, you can wait even async functions — just disable any other actions (for example, in demo.html I disable button until the function is done).