Skip to content

Error: Input key is empty #1

Open
@SN4T14

Description

@SN4T14

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions