We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e90780d commit 2488158Copy full SHA for 2488158
src/eckey.js
@@ -74,6 +74,7 @@ Bitcoin.ECKey = (function () {
74
75
ECKey.prototype.getExportedPrivateKey = function () {
76
var hash = this.priv.toByteArrayUnsigned();
77
+ while (hash.length < 32) hash.unshift(0);
78
hash.unshift(0x80);
79
var checksum = Crypto.SHA256(Crypto.SHA256(hash, {asBytes: true}), {asBytes: true});
80
var bytes = hash.concat(checksum.slice(0,4));
0 commit comments