Enable ruff E741 rule (#11370)

* Enable ruff E741 rule

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Maxim Smolskiy
2024-04-19 22:30:22 +03:00
committed by GitHub
parent 0a9a860eb1
commit a42eb35702
14 changed files with 102 additions and 92 deletions

View File

@ -44,11 +44,11 @@ def function(expansion, s0, s1, key, message):
right = message[4:]
temp = apply_table(right, expansion)
temp = xor(temp, key)
l = apply_sbox(s0, temp[:4])
r = apply_sbox(s1, temp[4:])
l = "0" * (2 - len(l)) + l
r = "0" * (2 - len(r)) + r
temp = apply_table(l + r, p4_table)
left_bin_str = apply_sbox(s0, temp[:4])
right_bin_str = apply_sbox(s1, temp[4:])
left_bin_str = "0" * (2 - len(left_bin_str)) + left_bin_str
right_bin_str = "0" * (2 - len(right_bin_str)) + right_bin_str
temp = apply_table(left_bin_str + right_bin_str, p4_table)
temp = xor(left, temp)
return temp + right