Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Input key is empty #1

Open
SN4T14 opened this issue Oct 18, 2015 · 1 comment
Open

Error: Input key is empty #1

SN4T14 opened this issue Oct 18, 2015 · 1 comment
Labels

Comments

@SN4T14
Copy link

SN4T14 commented Oct 18, 2015

If .hash() is fed an empty string, it throws this error:

{ [Error: Input key is empty] propertyValue: <Buffer > }

Code to reproduce the issue:

var scrypt = require('scrypt-for-humans');
var Promise = require('bluebird');

Promise.try(function(){
    return scrypt.hash("");
}).then(function(hash){
    console.log(hash);
}).catch(function (err) {
    console.log(err);
});

It should instead throw an error of type scrypt.InputError.

@SN4T14
Copy link
Author

SN4T14 commented Dec 10, 2015

To add to this, if you give .verify() an empty string, it throws this error:

{ err_code: 2, err_message: 'Module addon argument error: key cannot be empty' }

@joepie91 joepie91 added the bug label Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants