refactor customer interface to attributes

This commit is contained in:
2024-07-19 14:43:15 -05:00
parent 65d78867ca
commit 50dc917a90
11 changed files with 268 additions and 149 deletions

View File

@@ -1,7 +1,7 @@
from pydantic import BaseModel
from src.models import EncipheredNKode
from src.customer_interface import CustomerInterface
from src.customer_attributes import CustomerAttributes
from src.user_cipher_keys import UserCipherKeys
from src.user_interface import UserInterface
from src.utils import xor_lists
@@ -19,7 +19,7 @@ class User(BaseModel):
self.user_keys.set_key = xor_lists(self.user_keys.set_key, sets_xor)
self.user_keys.alpha_key = xor_lists(self.user_keys.alpha_key, attrs_xor)
def refresh_passcode(self, passcode_attr_idx: list[int], customer_interface: CustomerInterface):
def refresh_passcode(self, passcode_attr_idx: list[int], customer_interface: CustomerAttributes):
self.user_keys = UserCipherKeys.new(
customer_interface.keypad_size,
customer_interface.set_vals,