我尝试运行一个图像加密程序,该程序在消除了我被这段代码所卡住的大部分错误后,原来的程序在2.7中
项目文件的原始链接为https://github.com/AtheMathmo/ImageEncryptor/blob/master/ImageEncryptor/utils.py
尝试过该列表(p)
def main():
start = time.time()
two_kdp(25000, 12412513, 345987439589897)
end = time.time()
print (end - start)
def two_kdp(size,k1,k2):
# Initialization
y = 1
z = 1
p = k1 * k2
C = list(range(len(size)))
# Generate set
for i in range(size):
w = y + (k2 + i)
x = z + (k1 + i)
y += w
z += x + y
p = (p + y + z) % size
C[i] = int(p) (stuck at this point)