improve error message

This commit is contained in:
Ryan X. Charles 2014-09-16 11:44:51 -07:00
parent 6e9755b009
commit 6c42969d01
2 changed files with 2 additions and 2 deletions

View File

@ -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();

View File

@ -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() {