Skip to content

Commit

Permalink
Merge pull request #4 from matiu/update-6.4-4
Browse files Browse the repository at this point in the history
fix sign input
  • Loading branch information
matiu authored Jan 29, 2018
2 parents 817a5c6 + 93563d8 commit b2053a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/bitauth-browserify.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ BitAuth._getPublicKeyFromPrivateKey = function(privkey) {
};

BitAuth._sign = function(hashBuffer, privkey) {
var signature = ecdsa.sign(hashBuffer.toString('hex'), privkey);
var keys = ecdsa.keyFromPrivate(privkey, 'hex');
var signature = keys.sign(hashBuffer.toString('hex'));
var hexsignature = signature.toDER('hex');
return hexsignature;
};
Expand Down

0 comments on commit b2053a8

Please sign in to comment.