eggcrypt 3.1.4__tar.gz → 3.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/PKG-INFO +1 -1
- eggcrypt-3.2.0/eggcrypt/egg.py +191 -0
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/eggcrypt.egg-info/PKG-INFO +1 -1
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/pyproject.toml +1 -1
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/setup.py +2 -2
- eggcrypt-3.1.4/eggcrypt/egg.py +0 -181
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/LICENSE +0 -0
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/README.md +0 -0
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/eggcrypt/__init__.py +0 -0
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/eggcrypt.egg-info/SOURCES.txt +0 -0
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/eggcrypt.egg-info/dependency_links.txt +0 -0
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/eggcrypt.egg-info/top_level.txt +0 -0
- {eggcrypt-3.1.4 → eggcrypt-3.2.0}/setup.cfg +0 -0
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
from functools import lru_cache
|
|
2
|
+
def replace_non_255(text):
|
|
3
|
+
return ''.join(c if ord(c)<=255 else '?' for c in text)
|
|
4
|
+
def hash2(txt):
|
|
5
|
+
txt=str(txt)
|
|
6
|
+
data=txt.encode()
|
|
7
|
+
m=0xFFFFFFFFFFFFFFFF
|
|
8
|
+
h=0x9E3779B97F4A7C15^len(data)
|
|
9
|
+
i=0
|
|
10
|
+
while i+8<=len(data):
|
|
11
|
+
x=int.from_bytes(data[i:i+8],"little")
|
|
12
|
+
h^=x*0x9E3779B185EBCA87&m
|
|
13
|
+
h=((h<<31)|(h>>33))&m
|
|
14
|
+
h*=0xC2B2AE3D27D4EB4F&m
|
|
15
|
+
i+=8
|
|
16
|
+
x=0
|
|
17
|
+
for j,b in enumerate(data[i:]):
|
|
18
|
+
x|=b<<(j*8)
|
|
19
|
+
h^=x*0x165667B19E3779F9&m
|
|
20
|
+
h^=h>>33
|
|
21
|
+
h=h*0xFF51AFD7ED558CCD&m
|
|
22
|
+
h^=h>>33
|
|
23
|
+
h=h*0xC4CEB9FE1A85EC53&m
|
|
24
|
+
h^=h>>33
|
|
25
|
+
return str(h)
|
|
26
|
+
@lru_cache(maxsize=512)
|
|
27
|
+
def makesbox(key):
|
|
28
|
+
prev=hash2(key)
|
|
29
|
+
stream=[]
|
|
30
|
+
while len(stream)<256:
|
|
31
|
+
n=int(prev,36)
|
|
32
|
+
for _ in range(50):
|
|
33
|
+
stream.append(n&255)
|
|
34
|
+
n>>=8
|
|
35
|
+
if len(stream)>=256:
|
|
36
|
+
break
|
|
37
|
+
prev=hash2(prev)
|
|
38
|
+
unused=list(range(256))
|
|
39
|
+
sbox=[]
|
|
40
|
+
for i in range(255,-1,-1):
|
|
41
|
+
b=stream.pop()%(i+1)
|
|
42
|
+
sbox.append(unused.pop(b))
|
|
43
|
+
return sbox
|
|
44
|
+
def _to_bytes(data):
|
|
45
|
+
if isinstance(data, bytes):
|
|
46
|
+
return data
|
|
47
|
+
elif isinstance(data, str):
|
|
48
|
+
return data.encode('utf-8')
|
|
49
|
+
elif isinstance(data, int):
|
|
50
|
+
return str(data).encode('utf-8')
|
|
51
|
+
else:
|
|
52
|
+
return str(data).encode('utf-8')
|
|
53
|
+
def _xor_bytes(data, key):
|
|
54
|
+
data=_to_bytes(data)
|
|
55
|
+
key=_to_bytes(key)
|
|
56
|
+
key_len=len(key)
|
|
57
|
+
return bytes(data[i]^key[i%key_len] for i in range(len(data)))
|
|
58
|
+
def _diffuse_bytes(data):
|
|
59
|
+
data=bytearray(_to_bytes(data))
|
|
60
|
+
for i in range(1, len(data)):
|
|
61
|
+
data[i]^=data[i-1]
|
|
62
|
+
return bytes(data)
|
|
63
|
+
def _undiffuse_bytes(data):
|
|
64
|
+
data=bytearray(_to_bytes(data))
|
|
65
|
+
for i in range(len(data)-1, 0, -1):
|
|
66
|
+
data[i]^=data[i-1]
|
|
67
|
+
return bytes(data)
|
|
68
|
+
def _rol(x):
|
|
69
|
+
return ((x<<1)|(x>>7))&0xff
|
|
70
|
+
def _diffuse2_bytes(data):
|
|
71
|
+
data=bytearray(_to_bytes(data))
|
|
72
|
+
for i in range(1, len(data)):
|
|
73
|
+
data[i] ^= _rol(data[i-1])
|
|
74
|
+
return bytes(data)
|
|
75
|
+
def _undiffuse2_bytes(data):
|
|
76
|
+
data=bytearray(_to_bytes(data))
|
|
77
|
+
for i in range(len(data)-1, 0, -1):
|
|
78
|
+
data[i] ^= _rol(data[i-1])
|
|
79
|
+
return bytes(data)
|
|
80
|
+
def _permute_bytes(data, perm):
|
|
81
|
+
data=_to_bytes(data)
|
|
82
|
+
return bytes(data[i] for i in perm)
|
|
83
|
+
def make_perm(n, key=7):
|
|
84
|
+
perm=[]
|
|
85
|
+
used=set()
|
|
86
|
+
x=key&0x7fffffff
|
|
87
|
+
for _ in range(n):
|
|
88
|
+
x=(x*1103515245+12345)&0x7fffffff
|
|
89
|
+
x=int.from_bytes(_xor_bytes(str(x),hash2(x*0x9E3779B185EBCA87)),"big")
|
|
90
|
+
pos=x%n
|
|
91
|
+
while pos in used:
|
|
92
|
+
pos=(pos+1)%n
|
|
93
|
+
used.add(pos)
|
|
94
|
+
perm.append(pos)
|
|
95
|
+
return perm
|
|
96
|
+
def inverse_perm(perm):
|
|
97
|
+
inv=[0]*len(perm)
|
|
98
|
+
for new_pos, old_pos in enumerate(perm):
|
|
99
|
+
inv[old_pos]=new_pos
|
|
100
|
+
return inv
|
|
101
|
+
def round_sbox(key, r):
|
|
102
|
+
round_key=_xor_bytes(str(key), hash2(str(key)+str(r*0x9E3779B97F4A7C15)))
|
|
103
|
+
return makesbox(round_key.decode('latin-1', errors='replace'))
|
|
104
|
+
@lru_cache(maxsize=512)
|
|
105
|
+
def roundkey(key, r):
|
|
106
|
+
return int(hash2(str(key)+str(r*0x9E3779B97F4A7C15)), 36)
|
|
107
|
+
def encrypt(txt, key):
|
|
108
|
+
data=_to_bytes(txt)
|
|
109
|
+
for r in range(10):
|
|
110
|
+
rk=roundkey(key, r)
|
|
111
|
+
rk_bytes=str(rk).encode('utf-8')
|
|
112
|
+
data=_xor_bytes(data, rk_bytes)
|
|
113
|
+
sbox=round_sbox(key, r)
|
|
114
|
+
data=bytes(sbox[b] for b in data)
|
|
115
|
+
data=_diffuse2_bytes(data)
|
|
116
|
+
data=_diffuse_bytes(data)
|
|
117
|
+
perm=make_perm(len(data), roundkey(key, r))
|
|
118
|
+
data=_permute_bytes(data, perm)
|
|
119
|
+
for r in range(22):
|
|
120
|
+
h=hash2(hash2(r)+hash2(key))
|
|
121
|
+
data=_xor_bytes(data, h)
|
|
122
|
+
data=_diffuse2_bytes(data)
|
|
123
|
+
final_perm=make_perm(len(data), roundkey(key, 999))
|
|
124
|
+
data=_permute_bytes(data, final_perm)
|
|
125
|
+
return data.hex()
|
|
126
|
+
def decrypt(txt, key):
|
|
127
|
+
data=bytes.fromhex(txt)
|
|
128
|
+
final_perm=make_perm(len(data), roundkey(key, 999))
|
|
129
|
+
data=_permute_bytes(data, inverse_perm(final_perm))
|
|
130
|
+
data=_undiffuse2_bytes(data)
|
|
131
|
+
for r in range(21, -1, -1):
|
|
132
|
+
h=hash2(hash2(r)+hash2(key))
|
|
133
|
+
data=_xor_bytes(data, h)
|
|
134
|
+
for r in range(9, -1, -1):
|
|
135
|
+
perm=make_perm(len(data), roundkey(key, r))
|
|
136
|
+
data=_permute_bytes(data, inverse_perm(perm))
|
|
137
|
+
data=_undiffuse_bytes(data)
|
|
138
|
+
data=_undiffuse2_bytes(data)
|
|
139
|
+
sbox=round_sbox(key, r)
|
|
140
|
+
inv=[0]*256
|
|
141
|
+
for i, v in enumerate(sbox):
|
|
142
|
+
inv[v]=i
|
|
143
|
+
data=bytes(inv[b] for b in data)
|
|
144
|
+
rk=roundkey(key, r)
|
|
145
|
+
rk_bytes=str(rk).encode('utf-8')
|
|
146
|
+
data=_xor_bytes(data, rk_bytes)
|
|
147
|
+
return data.decode('utf-8', errors='replace')
|
|
148
|
+
def key(seed=""):
|
|
149
|
+
if seed=="":
|
|
150
|
+
import time
|
|
151
|
+
seed=int(str(seed).lstrip("-"))
|
|
152
|
+
for i in range(int(time.time()*10000)%100):
|
|
153
|
+
a=str(time.time()*10000)
|
|
154
|
+
a=a[0:10]
|
|
155
|
+
a=int(a)
|
|
156
|
+
seed=int(seed*a+(round(seed^a)))
|
|
157
|
+
return hash(hash2(seed))
|
|
158
|
+
def hash(inp):
|
|
159
|
+
inp=str(inp)
|
|
160
|
+
H=[0x243f6a8885a308d3,0x13198a2e03707344,0xa4093822299f31d0,0x082efa98ec4e6c89]
|
|
161
|
+
for i,c in enumerate(inp):
|
|
162
|
+
x=ord(c)+(i<<8)
|
|
163
|
+
j=i%4
|
|
164
|
+
H[j]^=x
|
|
165
|
+
H[j]=(H[j]*0x100000001b3)&0xffffffffffffffff
|
|
166
|
+
H[(j+1)%4]^=H[j]>>17
|
|
167
|
+
key_str=''.join(f'{x:016x}' for x in H)
|
|
168
|
+
tot=sum((i+1)*ord(c) for i,c in enumerate(key_str))
|
|
169
|
+
for i in inp:
|
|
170
|
+
tot^=ord(i)
|
|
171
|
+
out=""
|
|
172
|
+
for i in key_str:
|
|
173
|
+
v=int(i,16)
|
|
174
|
+
out+=str(v+((tot*v)%256))
|
|
175
|
+
o=""
|
|
176
|
+
for i in out:o+=chr((int(i)+tot)%256)
|
|
177
|
+
out=""
|
|
178
|
+
for i in range(len(o)-1):out+=str(i*tot+ord(o[i]))
|
|
179
|
+
for n in map(int,[out[i:i+2] for i in range(0,len(out),2)]):o+=chr(n+32)
|
|
180
|
+
if len(out)%2:o+=chr(int(out[-1])*21)
|
|
181
|
+
o=o.lstrip("0123456789")
|
|
182
|
+
h=0
|
|
183
|
+
for c in o:
|
|
184
|
+
h^=ord(c)
|
|
185
|
+
h=((h<<13)|(h >> 243))&((1<<256)-1)
|
|
186
|
+
h=(h*0x9e3779b97f4a7c15)&((1<<256)-1)
|
|
187
|
+
chars="0123456789abcdefghijklmnopqrstuvwxyz"
|
|
188
|
+
x=""
|
|
189
|
+
while h:x=chars[h%36]+x;h//=36
|
|
190
|
+
out=x.zfill(50)
|
|
191
|
+
return out
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "eggcrypt"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.2.0"
|
|
8
8
|
description = "A pretty secure (yet inneficient) encryption program. Has key(), hash(), encrypt() and decrypt()."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
@@ -5,7 +5,7 @@ README = Path("README.md").read_text(encoding="utf-8")
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="eggcrypt",
|
|
8
|
-
version="3.
|
|
8
|
+
version="3.2.0",
|
|
9
9
|
packages=find_packages(),
|
|
10
10
|
description="A pretty secure (yet inefficient) encryption program.",
|
|
11
11
|
long_description=README,
|
|
@@ -14,4 +14,4 @@ setup(
|
|
|
14
14
|
license="MIT",
|
|
15
15
|
license_files=("LICENSE",),
|
|
16
16
|
python_requires=">=3.7",
|
|
17
|
-
)
|
|
17
|
+
)
|
eggcrypt-3.1.4/eggcrypt/egg.py
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
from functools import lru_cache
|
|
2
|
-
def replace_non_255(text):
|
|
3
|
-
return ''.join(c if ord(c)<=255 else '?' for c in text)
|
|
4
|
-
def hash2(txt):
|
|
5
|
-
txt=str(txt)
|
|
6
|
-
data=txt.encode()
|
|
7
|
-
m=0xFFFFFFFFFFFFFFFF
|
|
8
|
-
h=0x9E3779B97F4A7C15^len(data)
|
|
9
|
-
i=0
|
|
10
|
-
while i+8<=len(data):
|
|
11
|
-
x=int.from_bytes(data[i:i+8],"little")
|
|
12
|
-
h^=x*0x9E3779B185EBCA87&m
|
|
13
|
-
h=((h<<31)|(h>>33))&m
|
|
14
|
-
h*=0xC2B2AE3D27D4EB4F&m
|
|
15
|
-
i+=8
|
|
16
|
-
x=0
|
|
17
|
-
for j,b in enumerate(data[i:]):
|
|
18
|
-
x|=b<<(j*8)
|
|
19
|
-
h^=x*0x165667B19E3779F9&m
|
|
20
|
-
h^=h>>33
|
|
21
|
-
h=h*0xFF51AFD7ED558CCD&m
|
|
22
|
-
h^=h>>33
|
|
23
|
-
h=h*0xC4CEB9FE1A85EC53&m
|
|
24
|
-
h^=h>>33
|
|
25
|
-
return str(h)
|
|
26
|
-
@lru_cache(maxsize=512)
|
|
27
|
-
def makesbox(key):
|
|
28
|
-
prev=hash2(key)
|
|
29
|
-
stream=[]
|
|
30
|
-
while len(stream)<256:
|
|
31
|
-
n=int(prev,36)
|
|
32
|
-
for _ in range(50):
|
|
33
|
-
stream.append(n&255)
|
|
34
|
-
n>>=8
|
|
35
|
-
if len(stream)>=256:
|
|
36
|
-
break
|
|
37
|
-
prev=hash2(prev)
|
|
38
|
-
unused=list(range(256))
|
|
39
|
-
sbox=[]
|
|
40
|
-
for i in range(255,-1,-1):
|
|
41
|
-
b=stream.pop()% (i+1)
|
|
42
|
-
sbox.append(unused.pop(b))
|
|
43
|
-
return sbox
|
|
44
|
-
def xor_text(txt,key):
|
|
45
|
-
key=str(key)
|
|
46
|
-
out=""
|
|
47
|
-
for i,ch in enumerate(txt):
|
|
48
|
-
out+=chr(ord(ch)^ord(key[i%len(key)]))
|
|
49
|
-
return out
|
|
50
|
-
def diffuse(data):
|
|
51
|
-
data=[ord(c) for c in data]
|
|
52
|
-
for i in range(1,len(data)):
|
|
53
|
-
data[i]^=data[i-1]
|
|
54
|
-
return "".join(chr(x) for x in data)
|
|
55
|
-
def undiffuse(data):
|
|
56
|
-
data=[ord(c) for c in data]
|
|
57
|
-
for i in range(len(data)-1,0,-1):
|
|
58
|
-
data[i]^=data[i-1]
|
|
59
|
-
return "".join(chr(x) for x in data)
|
|
60
|
-
def rol(x):
|
|
61
|
-
return ((x<<1)|(x>>7))&0xff
|
|
62
|
-
def diffuse2(data):
|
|
63
|
-
data=[ord(c) for c in data]
|
|
64
|
-
for i in range(1,len(data)):
|
|
65
|
-
data[i]^=rol(data[i-1])
|
|
66
|
-
return "".join(chr(x) for x in data)
|
|
67
|
-
def undiffuse2(data):
|
|
68
|
-
data=[ord(c) for c in data]
|
|
69
|
-
for i in range(len(data)-1,0,-1):
|
|
70
|
-
data[i]^=rol(data[i-1])
|
|
71
|
-
return "".join(chr(x) for x in data)
|
|
72
|
-
def round_sbox(key,r):
|
|
73
|
-
round_key=xor_text(str(key),hash2(str(key)+str(r*0x9E3779B97F4A7C15)))
|
|
74
|
-
return makesbox(round_key)
|
|
75
|
-
@lru_cache(maxsize=512)
|
|
76
|
-
def roundkey(key,r):
|
|
77
|
-
return int(hash2(str(key)+str(r*0x9E3779B97F4A7C15)),36)
|
|
78
|
-
def permute(data, perm):
|
|
79
|
-
return "".join(data[i] for i in perm)
|
|
80
|
-
def make_perm(n, key=7):
|
|
81
|
-
perm=[]
|
|
82
|
-
used=set()
|
|
83
|
-
x=key&0x7fffffff
|
|
84
|
-
for _ in range(n):
|
|
85
|
-
x=(x*1103515245+12345)&0x7fffffff
|
|
86
|
-
x=int.from_bytes(xor_text(str(x),hash2(x*0x9E3779B185EBCA87)).encode(),"big")
|
|
87
|
-
pos=x%n
|
|
88
|
-
while pos in used:
|
|
89
|
-
pos=(pos+1)%n
|
|
90
|
-
used.add(pos)
|
|
91
|
-
perm.append(pos)
|
|
92
|
-
return perm
|
|
93
|
-
def inverse_perm(perm):
|
|
94
|
-
inv=[0]*len(perm)
|
|
95
|
-
for new_pos, old_pos in enumerate(perm):
|
|
96
|
-
inv[old_pos]=new_pos
|
|
97
|
-
return inv
|
|
98
|
-
def encrypt(txt,key):
|
|
99
|
-
txt=replace_non_255(txt)
|
|
100
|
-
for r in range(10):
|
|
101
|
-
txt=xor_text(txt,roundkey(key,r))
|
|
102
|
-
sbox=round_sbox(key,r)
|
|
103
|
-
out=""
|
|
104
|
-
for ch in txt:
|
|
105
|
-
out+=chr(sbox[ord(ch)])
|
|
106
|
-
txt=diffuse2(out)
|
|
107
|
-
txt=diffuse(txt)
|
|
108
|
-
perm=make_perm(len(txt), roundkey(key,r))
|
|
109
|
-
txt=permute(txt,perm)
|
|
110
|
-
for r in range(22):
|
|
111
|
-
txt=xor_text(txt, hash2(hash2(r)+hash2(key)))
|
|
112
|
-
txt=diffuse2(txt)
|
|
113
|
-
final_perm =make_perm(len(txt), roundkey(key,999))
|
|
114
|
-
txt=permute(txt,final_perm)
|
|
115
|
-
return txt.encode("latin-1").hex()
|
|
116
|
-
def decrypt(txt,key):
|
|
117
|
-
txt=replace_non_255(txt)
|
|
118
|
-
txt=bytes.fromhex(txt).decode("latin-1")
|
|
119
|
-
final_perm=make_perm(len(txt),roundkey(key,999))
|
|
120
|
-
txt=permute(txt,inverse_perm(final_perm))
|
|
121
|
-
txt=undiffuse2(txt)
|
|
122
|
-
for r in range(21,-1,-1):
|
|
123
|
-
txt=xor_text(txt,hash2(hash2(r)+hash2(key)))
|
|
124
|
-
for r in range(9,-1,-1):
|
|
125
|
-
perm=make_perm(len(txt),roundkey(key,r))
|
|
126
|
-
txt=permute(txt, inverse_perm(perm))
|
|
127
|
-
txt=undiffuse(txt)
|
|
128
|
-
txt=undiffuse2(txt)
|
|
129
|
-
sbox=round_sbox(key,r)
|
|
130
|
-
inv=[0]*256
|
|
131
|
-
for i,v in enumerate(sbox):
|
|
132
|
-
inv[v]=i
|
|
133
|
-
out=""
|
|
134
|
-
for ch in txt:
|
|
135
|
-
out+=chr(inv[ord(ch)])
|
|
136
|
-
txt=xor_text(out,roundkey(key,r))
|
|
137
|
-
return txt
|
|
138
|
-
def key(seed):
|
|
139
|
-
import time
|
|
140
|
-
seed=int(str(seed).lstrip("-"))
|
|
141
|
-
for i in range(int(time.time()*10000)%100):
|
|
142
|
-
a=str(time.time()*10000)
|
|
143
|
-
a=a[0:10]
|
|
144
|
-
a=int(a)
|
|
145
|
-
seed=int(seed*a+(round(seed^a)))
|
|
146
|
-
|
|
147
|
-
return hash(hash2(seed))
|
|
148
|
-
def hash(inp):
|
|
149
|
-
inp=str(inp)
|
|
150
|
-
H=[0x243f6a8885a308d3,0x13198a2e03707344,0xa4093822299f31d0,0x082efa98ec4e6c89]
|
|
151
|
-
for i,c in enumerate(inp):
|
|
152
|
-
x=ord(c)+(i<<8)
|
|
153
|
-
j=i%4
|
|
154
|
-
H[j]^=x
|
|
155
|
-
H[j]=(H[j]*0x100000001b3)&0xffffffffffffffff
|
|
156
|
-
H[(j+1)%4]^=H[j]>>17
|
|
157
|
-
key_str=''.join(f'{x:016x}' for x in H)
|
|
158
|
-
tot=sum((i+1)*ord(c) for i,c in enumerate(key_str))
|
|
159
|
-
for i in inp:
|
|
160
|
-
tot^=ord(i)
|
|
161
|
-
out=""
|
|
162
|
-
for i in key_str:
|
|
163
|
-
v=int(i,16)
|
|
164
|
-
out+=str(v+((tot*v)%256))
|
|
165
|
-
o=""
|
|
166
|
-
for i in out:o+=chr((int(i)+tot)%256)
|
|
167
|
-
out=""
|
|
168
|
-
for i in range(len(o)-1):out+=str(i*tot+ord(o[i]))
|
|
169
|
-
for n in map(int,[out[i:i+2] for i in range(0,len(out),2)]):o+=chr(n+32)
|
|
170
|
-
if len(out)%2:o+=chr(int(out[-1])*21)
|
|
171
|
-
o=o.lstrip("0123456789")
|
|
172
|
-
h=0
|
|
173
|
-
for c in o:
|
|
174
|
-
h^=ord(c)
|
|
175
|
-
h=((h<<13)|(h >> 243))&((1<<256)-1)
|
|
176
|
-
h=(h*0x9e3779b97f4a7c15)&((1<<256)-1)
|
|
177
|
-
chars="0123456789abcdefghijklmnopqrstuvwxyz"
|
|
178
|
-
x=""
|
|
179
|
-
while h:x=chars[h%36]+x;h//=36
|
|
180
|
-
out=x.zfill(50)
|
|
181
|
-
return out
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|