shaneMangudi / bcrypt-nodejs

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

function hash(data, salt, progress, callback) breaks compatibility #11

Closed dcodeIO closed 8 years ago

dcodeIO commented 11 years ago

The progress parameter breaks compatibility with the native bcrypt package.

    if(!callback) {
        throw "No callback function was given."
    }

Should become

    if(typeof callback == 'undefined') {
        callback = progress;
        progress = null;
    }
geekhack commented 10 years ago

@dcodeIO ..thanks, this sorted my issue...

ysulyma commented 10 years ago

Just ran into this issue, please merge PR from @markau