replace all occurences of key length

This commit is contained in:
poma 2019-10-04 16:21:38 +03:00
parent 8415055588
commit 0e2f8ab280
1 changed files with 3 additions and 3 deletions

6
cli.js
View File

@ -446,7 +446,7 @@ function generateVerifier_original(verificationKey) {
// The points
template = template.replace("<%vk_input_length%>", (verificationKey.IC.length-1).toString());
template = template.replace(/<%vk_input_length%>/g, (verificationKey.IC.length-1).toString());
template = template.replace("<%vk_ic_length%>", verificationKey.IC.length.toString());
let vi = "";
for (let i=0; i<verificationKey.IC.length; i++) {
@ -488,7 +488,7 @@ function generateVerifier_groth(verificationKey) {
// The points
template = template.replace("<%vk_input_length%>", (verificationKey.IC.length-1).toString());
template = template.replace(/<%vk_input_length%>/g, (verificationKey.IC.length-1).toString());
template = template.replace("<%vk_ic_length%>", verificationKey.IC.length.toString());
let vi = "";
for (let i=0; i<verificationKey.IC.length; i++) {
@ -529,7 +529,7 @@ function generateVerifier_kimleeoh(verificationKey) {
// The points
template = template.replace("<%vk_input_length%>", (verificationKey.IC.length-1).toString());
template = template.replace(/<%vk_input_length%>/g, (verificationKey.IC.length-1).toString());
template = template.replace("<%vk_ic_length%>", verificationKey.IC.length.toString());
let vi = "";
for (let i=0; i<verificationKey.IC.length; i++) {