refactor np.bitwise xor to ^ operator

This commit is contained in:
2025-03-16 06:20:05 -05:00
parent daebb61e56
commit b6ab0c1890
5 changed files with 149 additions and 158 deletions

View File

@@ -18,8 +18,8 @@ class User:
def renew_keys(self, set_xor: np.ndarray, prop_xor: np.ndarray):
self.renew = True
self.cipher.set_key = np.bitwise_xor(self.cipher.set_key, set_xor)
self.cipher.prop_key = np.bitwise_xor(self.cipher.prop_key, prop_xor)
self.cipher.combined_set_key = self.cipher.combined_set_key ^ set_xor
self.cipher.prop_key = self.cipher.prop_key ^ prop_xor
def refresh_passcode(self, passcode_prop_idxs: list[int], customer_cipher: CustomerCipher):
self.cipher = UserCipher.create(