diff options
author | Lint Action <[email protected]> | 2021-05-04 06:09:42 +0000 |
---|---|---|
committer | Lint Action <[email protected]> | 2021-05-04 06:09:42 +0000 |
commit | 07a7e41f72cfa9dfd207a04445f4aa5b0b6fa3ce (patch) | |
tree | b02c1b4e674acf6f56cf7335ad05acd0523af91c /ATRI/plugins/rich/data_source.py | |
parent | 8e94b4cd4aea1943a9639b900e33fe0fa1de5bb8 (diff) | |
download | ATRI-07a7e41f72cfa9dfd207a04445f4aa5b0b6fa3ce.tar.gz ATRI-07a7e41f72cfa9dfd207a04445f4aa5b0b6fa3ce.tar.bz2 ATRI-07a7e41f72cfa9dfd207a04445f4aa5b0b6fa3ce.zip |
:rotating_light: 自动进行代码格式化
Diffstat (limited to 'ATRI/plugins/rich/data_source.py')
-rw-r--r-- | ATRI/plugins/rich/data_source.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ATRI/plugins/rich/data_source.py b/ATRI/plugins/rich/data_source.py index 32ac219..59474ff 100644 --- a/ATRI/plugins/rich/data_source.py +++ b/ATRI/plugins/rich/data_source.py @@ -1,4 +1,4 @@ -table = 'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF' +table = "fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF" tr = {} for i in range(58): tr[table[i]] = i @@ -10,13 +10,13 @@ add = 8728348608 def dec(x) -> int: r = 0 for i in range(6): - r += tr[x[s[i]]] * 58**i + r += tr[x[s[i]]] * 58 ** i return (r - add) ^ xor def enc(x) -> str: x = (x ^ xor) + add - r = list('BV1 4 1 7 ') + r = list("BV1 4 1 7 ") for i in range(6): - r[s[i]] = table[x // 58**i % 58] - return ''.join(r) + r[s[i]] = table[x // 58 ** i % 58] + return "".join(r) |