refactor; rename alpha to prop
This commit is contained in:
@@ -2,7 +2,7 @@ from jinja2 import Environment, FileSystemLoader
|
||||
import os
|
||||
from src.nkode_api import NKodeAPI
|
||||
from src.models import NKodePolicy, KeypadSize, EncipheredNKode
|
||||
from src.user_cipher_keys import UserCipher
|
||||
from src.user_cipher import UserCipher
|
||||
from src.utils import list_to_matrix, matrix_transpose, xor_lists
|
||||
from secrets import choice
|
||||
from string import ascii_lowercase
|
||||
@@ -101,7 +101,7 @@ if __name__ == "__main__":
|
||||
ciphered_mask = xor_lists(ciphered_mask, user_keys.mask_key)
|
||||
mask = user_keys.encode_base64_str(ciphered_mask)
|
||||
|
||||
ciphered_customer_attrs = xor_lists(customer.customer_cipher.prop_key, user_keys.alpha_key)
|
||||
ciphered_customer_attrs = xor_lists(customer.customer_cipher.prop_key, user_keys.prop_key)
|
||||
passcode_ciphered_attrs = [ciphered_customer_attrs[idx] for idx in user_passcode]
|
||||
pad_len = customer.nkode_policy.max_nkode_len - passcode_len
|
||||
|
||||
@@ -176,7 +176,7 @@ if __name__ == "__main__":
|
||||
for user in customer.users.values():
|
||||
user.renew = True
|
||||
user.user_keys.set_key = xor_lists(user.user_keys.set_key, sets_xor)
|
||||
user.user_keys.alpha_key = xor_lists(user.user_keys.alpha_key, attrs_xor)
|
||||
user.user_keys.prop_key = xor_lists(user.user_keys.prop_key, attrs_xor)
|
||||
|
||||
"""
|
||||
REFRESH USER KEYS
|
||||
|
||||
Reference in New Issue
Block a user