双倍des加解密

在这里插入图片描述



from Crypto.Cipher import DES

def double_des_encrypt(key, plaintext):
    cipher = DES.new(key[:8], DES.MODE_ECB)  # 第一个DES加密
    ciphertext = cipher.encrypt(plaintext)
    cipher = DES.new(key[8:]

猜你喜欢

转载自blog.csdn.net/qq_45662588/article/details/135454457