shaneMangudi / bcrypt-nodejs

Native implementation of bcrypt for NodeJS
Other
574 stars 69 forks source link

Documentation is wrong for hash #1

Closed alexmurray closed 11 years ago

alexmurray commented 12 years ago

hash has an undocumented progress parameter in position 3, not the callback function which is argument 4 - I suggest to either dynamically detect when it is not passed in (ie. progress is non-null, but callback is null - assume progress is callback) or update the documentation to state this.

julienfouilhe commented 11 years ago

I agree, this issue made me lose thirty minutes trying to figure out what was going on. Would be a good idea to put it in the documentation.

Thanks.

lxjuly commented 11 years ago

It seems he is not maintaining this code. @alexmurray Do you know what's the meaning of that progress? Is it used at all??

alexmurray commented 11 years ago

from reading the code it looks like progress is designed to be a function callback which gets called during the calculation of the hash every 1% increment of the way...

lxjuly commented 11 years ago

I see. This looks like a useful implementation

shaneMangudi commented 11 years ago

Sorry for the massive delay. @alexmurray I believe you're right. The function progress gets called every time progress increases by 1%. Thanks for all the hard work. I believe the issue is closed now as I've merged your code in.