python xor 加密算法

创建日期: 2024-07-30 10:34 | 作者: 风波 | 浏览次数: 10 | 分类: Python

来源:https://stackoverflow.com/questions/14526231/python-xor-hex-strings

def xor_strings(xs, ys):
    return "".join(chr(ord(x) ^ ord(y)) for x, y in zip(xs, ys))

xored = xor_strings(binary_a, binary_b).encode("hex")
10 浏览
8 爬虫
0 评论