implement replay analysis (#7)

Co-authored-by: Donovan <donovan.a.kelly@pm.me>
Reviewed-on: https://git.infra.nkode.tech/dkelly/evilnkode/pulls/7
This commit is contained in:
dkelly
2025-09-05 16:02:29 +00:00
parent 6d07c24c71
commit 6c07d62cbe
6 changed files with 205 additions and 118 deletions

View File

@@ -42,4 +42,4 @@ def test_evilkode(number_of_keys, properties_per_key, passcode_len, observations
)
evilout = evilkode.run()
assert evilout.iterations > 1
assert evilout.iterations_to_break > 1

View File

@@ -1,6 +1,8 @@
import numpy as np
from src.keypad import Keypad
from src.tower_shuffle import TowerShuffle
def test_keypad():
keypad = Keypad(
@@ -8,7 +10,7 @@ def test_keypad():
[8, 9, 10, 11],
[0, 5, 2, 3],
[4, 1, 6,7]
]), k= 3, p=4, keypad_cache=[])
]), k= 3, p=4, keypad_cache=[], tower_shuffler=TowerShuffle.new(3*4))
assert keypad.key_entry([8, 5, 6, 11]) == [0,1,2,0]