Browse Source

integration: mimic HDNode speedup

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
e5e24256fd
  1. 6
      test/integration/crypto.js

6
test/integration/crypto.js

@ -65,14 +65,14 @@ describe('bitcoinjs-lib (crypto)', function () {
var d1 = child.keyPair.d
var d2
var indexBuffer = new Buffer(4)
var data = new Buffer(37)
serQP.copy(data, 0)
// search index space until we find it
for (var i = 0; i < bitcoin.HDNode.HIGHEST_BIT; ++i) {
indexBuffer.writeUInt32BE(i, 0)
data.writeUInt32BE(i, 33)
// calculate I
var data = Buffer.concat([serQP, indexBuffer])
var I = crypto.createHmac('sha512', master.chainCode).update(data).digest()
var IL = I.slice(0, 32)
var pIL = bigi.fromBuffer(IL)

Loading…
Cancel
Save