File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2121import string
2222
2323import numpy as np
24+
2425from maths .greatest_common_divisor import greatest_common_divisor
2526
2627
@@ -144,8 +145,8 @@ def check_determinant(self) -> None:
144145 ValueError: determinant modular 36 of encryption key(0) is not co prime
145146 w.r.t 36. Try another key.
146147 """
147- # 修复冗余的整数转换
148- det = int ( round (np .linalg .det (self .encrypt_key ) ))
148+
149+ det = round (np .linalg .det (self .encrypt_key ))
149150
150151 if det < 0 :
151152 det = det % len (self .key_string )
@@ -270,8 +271,8 @@ def make_decrypt_key(self) -> np.ndarray:
270271 ValueError: determinant modular 36 of encryption key(0) is not co prime
271272 w.r.t 36. Try another key.
272273 """
273- # 修复冗余的整数转换
274- det = int ( round (np .linalg .det (self .encrypt_key ) ))
274+
275+ det = round (np .linalg .det (self .encrypt_key ))
275276
276277 if det < 0 :
277278 det = det % len (self .key_string )
You can’t perform that action at this time.
0 commit comments