add enrollment diagrams

This commit is contained in:
2025-03-24 04:49:39 -05:00
parent 5031062e87
commit 1f188e82ed
6 changed files with 340 additions and 162 deletions

View File

@@ -1,8 +1,5 @@
from dataclasses import dataclass
from uuid import UUID, uuid4
import numpy as np
from src.customer_cipher import CustomerCipher
from src.models import NKodePolicy
from src.user import User

View File

@@ -28,3 +28,7 @@ def keypad_md_table(keypad_list: np.ndarray, keypad_size: KeypadSize) -> str:
table += "|".join([str(prop) for prop in keypad[key]])
table += "|"
return table
def select_keys_with_passcode_values(user_passcode_idxs: list[int], keypad: np.ndarray, props_per_key: int) -> list[int]:
indices = [np.where(keypad == prop)[0][0] for prop in user_passcode_idxs]
return [int(index // props_per_key) for index in indices]