Merge pull request #4 from matiu/update-6.4-4

fix sign input
This commit is contained in:
Matias Alejo Garcia 2018-01-29 13:24:31 -03:00 committed by GitHub
commit b2053a8f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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;
};