Skip to content

Commit

Permalink
Adapt the Python script generating the JSON files to the format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Sep 21, 2024
1 parent d34850b commit caed669
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion test-vectors/aegis-128x2-test-vectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
"tag128": "1aebc200804f405cab637f2adebb6d77",
"tag256": "c471876f9b4978c44f2ae1ce770cdb11a094ee3feca64e7afcd48bfe52c60eca"
}
]
]
13 changes: 8 additions & 5 deletions test-vectors/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,20 @@ def filename(topic):
in_tv = False
continue

if line == "~~~":
if in_tv:
tvs.append(tv)
in_tv = not in_tv
current_key = None
if line == "~~~ test-vectors":
in_tv = True
tv = {"name": tv_name}
if must_fail:
tv["error"] = "verification failed"
must_fail = False
continue

if line == "~~~":
tvs.append(tv)
in_tv = False
current_key = None
continue

if line.find("verification failed") != -1:
must_fail = True
continue
Expand Down

0 comments on commit caed669

Please sign in to comment.