From e5e24256fd9423a2b300e105f6133198e36743da Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Thu, 20 Aug 2015 18:24:40 +1000 Subject: [PATCH] integration: mimic HDNode speedup --- test/integration/crypto.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/crypto.js b/test/integration/crypto.js index 12ed70c..1dd8e7a 100644 --- a/test/integration/crypto.js +++ b/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)