Changes to new version-less ECKey API
This commit is contained in:
parent
a1be488d1b
commit
b40374e332
9 changed files with 61 additions and 85 deletions
src
|
@ -291,11 +291,11 @@ var ECDSA = {
|
|||
*/
|
||||
calcPubkeyRecoveryParam: function (origPubkey, r, s, hash)
|
||||
{
|
||||
var address = origPubkey.getBitcoinAddress().toString();
|
||||
var address = origPubkey.getAddress().toString();
|
||||
for (var i = 0; i < 4; i++) {
|
||||
var pubkey = ECDSA.recoverPubKey(r, s, hash, i);
|
||||
pubkey.compressed = origPubkey.compressed;
|
||||
if (pubkey.getBitcoinAddress().toString() == address) {
|
||||
if (pubkey.getAddress().toString() == address) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue