1
0
mirror of https://github.com/x-hw/amazing-qr.git synced 2025-07-11 01:10:17 +02:00

code more

This commit is contained in:
sylnsfar
2016-08-29 23:02:17 +08:00
parent e6fe986e6d
commit d1a9eba3ea
4 changed files with 99 additions and 11 deletions

5
ecc.py
View File

@ -27,10 +27,11 @@ def divide(MP, *GP):
GP[i] %= 255
GP[i] = po2[GP[i]]
return XOR(MP, GP)
return XOR(GP, *MP)
def XOR(MP, GP):
def XOR(GP, *MP):
MP = list(MP)
a = len(MP) - len(GP)
if a < 0:
MP += [0] * (-a)