1 parent 95f4b80 commit f8bd7b7Copy full SHA for f8bd7b7
1 file changed
codext/crypto/shift.py
@@ -19,12 +19,12 @@
19
20
21
def ord_shift_decode(i):
22
- return ord_shift_encode(-i)
+ return ord_shift_encode(-int(i))
23
24
25
def ord_shift_encode(i):
26
def encode(text, errors="strict"):
27
- r = "".join(chr((ord(c) + i) % 256) for c in text)
+ r = "".join(chr((ord(c) + int(i)) % 256) for c in text)
28
return r, len(r)
29
return encode
30
0 commit comments