From ff8c427217e797d6aafd0a3a9b420de243aa51d1 Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Sun, 25 Oct 2020 10:22:21 +0100 Subject: [PATCH] Fix Apply key BigBuffer --- build/main.cjs | 8 +++++++- src/engine_applykey.js | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/build/main.cjs b/build/main.cjs index ab0dff6..7ca993e 100644 --- a/build/main.cjs +++ b/build/main.cjs @@ -6677,7 +6677,13 @@ function buildBatchApplyKey(curve, groupName) { const result = await Promise.all(opPromises); - const outBuff = new Uint8Array(nPoints*sGout); + let outBuff; + if (buff instanceof BigBuffer) { + outBuff = new BigBuffer(nPoints*sGout); + } else { + outBuff = new Uint8Array(nPoints*sGout); + } + let p=0; for (let i=0; i