Skip to content

Commit f8bd7b7

Browse files
committed
Fixed codec: shift
1 parent 95f4b80 commit f8bd7b7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

codext/crypto/shift.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020

2121
def ord_shift_decode(i):
22-
return ord_shift_encode(-i)
22+
return ord_shift_encode(-int(i))
2323

2424

2525
def ord_shift_encode(i):
2626
def encode(text, errors="strict"):
27-
r = "".join(chr((ord(c) + i) % 256) for c in text)
27+
r = "".join(chr((ord(c) + int(i)) % 256) for c in text)
2828
return r, len(r)
2929
return encode
3030

0 commit comments

Comments
 (0)