diff --git a/lib/ecdsa.js b/lib/ecdsa.js index f33ea51..ddb4af6 100644 --- a/lib/ecdsa.js +++ b/lib/ecdsa.js @@ -114,7 +114,7 @@ ECDSA.prototype.sig2pubkey = function() { ECDSA.prototype.sigError = function() { if (!Buffer.isBuffer(this.hashbuf) || this.hashbuf.length !== 32) - return 'Invalid hash'; + return 'hashbuf must be a 32 byte buffer'; try { this.keypair.pubkey.validate(); diff --git a/test/ecdsa.js b/test/ecdsa.js index bf04979..5de755e 100644 --- a/test/ecdsa.js +++ b/test/ecdsa.js @@ -105,7 +105,7 @@ describe("ECDSA", function() { it('should return an error if the hash is invalid', function() { var ecdsa = new ECDSA(); - ecdsa.sigError().should.equal('Invalid hash'); + ecdsa.sigError().should.equal('hashbuf must be a 32 byte buffer'); }); it('should return an error if the pubkey is invalid', function() {