js-scrypt icon indicating copy to clipboard operation
js-scrypt copied to clipboard

Progress callback

Open hrobeers opened this issue 8 years ago • 2 comments

It would be nice to pass an optional progress callback function to support a progress bar. Something similar to what scryptsy does (https://github.com/cryptocoinjs/scryptsy) Unfortunately scryptsy is terribly slow.

I checked with the emscripten documentation and this should be possible.

hrobeers avatar Jun 02 '16 14:06 hrobeers

Nice idea. Emscripten can definitely call out to Javascript code, yes, but the underlying scrypt library C code would also have to be modified to support a callback (or to reify its control, like chunked hashing functions do, but that'd be more invasive). It'd be ideal if this were done upstream, but we could consider doing it as a patch maintained as part of this project.

tonyg avatar Jun 02 '16 15:06 tonyg

I'm glad you like it. For me it's not a game changer right now, I'll try to look into this if the need is there. Let's keep it here as a feature request so that it can be picked up by anyone to propose an implementation.

hrobeers avatar Jun 03 '16 07:06 hrobeers