mirror of
https://github.com/CryptKeeperZK/ffjavascript.git
synced 2026-05-03 03:00:11 -04:00
Fix Apply key BigBuffer
This commit is contained in:
@@ -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<result.length; i++) {
|
||||
outBuff.set(result[i][0], p);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import BigBuffer from "./bigbuffer.js";
|
||||
|
||||
export default function buildBatchApplyKey(curve, groupName) {
|
||||
const G = curve[groupName];
|
||||
@@ -101,7 +102,13 @@ export default 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<result.length; i++) {
|
||||
outBuff.set(result[i][0], p);
|
||||
|
||||
Reference in New Issue
Block a user