Fix padding issue with exported private keys.
This commit is contained in:
parent
e90780d3d3
commit
24881584c7
1 changed files with 1 additions and 0 deletions
|
@ -74,6 +74,7 @@ Bitcoin.ECKey = (function () {
|
|||
|
||||
ECKey.prototype.getExportedPrivateKey = function () {
|
||||
var hash = this.priv.toByteArrayUnsigned();
|
||||
while (hash.length < 32) hash.unshift(0);
|
||||
hash.unshift(0x80);
|
||||
var checksum = Crypto.SHA256(Crypto.SHA256(hash, {asBytes: true}), {asBytes: true});
|
||||
var bytes = hash.concat(checksum.slice(0,4));
|
||||
|
|
Loading…
Add table
Reference in a new issue