This commit is contained in:
Aditya Bisht
2024-01-22 05:19:12 +05:30
parent 105c8dcb3b
commit 5b93fcaf15
3 changed files with 7 additions and 10 deletions

View File

@@ -2,7 +2,7 @@ pragma circom 2.1.5;
include "@zk-email/zk-regex-circom/circuits/regex_helpers.circom";
// regex: email was meant for @[a-zA-Z0-9_]+.
// regex: email was meant for @(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9|_)+
template SimpleRegexDecomposed(msg_bytes) {
signal input msg[msg_bytes];
signal output out;

View File

@@ -6,7 +6,7 @@
},
{
"is_public": true,
"regex_def": "[a-zA-Z0-9_]+"
"regex_def": "(a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z|0|1|2|3|4|5|6|7|8|9|_)+"
},
{
"is_public": false,

View File

@@ -15,14 +15,11 @@ jest.setTimeout(120000);
describe("Simple Regex Decomposed", () => {
let circuit;
beforeAll(async () => {
compiler.genFromDecomposed(
path.join(__dirname, "./circuits/simple_regex_decomposed.json"),
{
circomFilePath: path.join(__dirname, "./circuits/simple_regex_decomposed.circom"),
templateName: "SimpleRegexDecomposed",
genSubstrs: true
}
);
compiler.genFromDecomposed(path.join(__dirname, "./circuits/simple_regex_decomposed.json"), {
circomFilePath: path.join(__dirname, "./circuits/simple_regex_decomposed.circom"),
templateName: "SimpleRegexDecomposed",
genSubstrs: true
});
circuit = await wasm_tester(path.join(__dirname, "./circuits/test_simple_regex_decomposed.circom"), option);
});