gpt4 book ai didi

python - 将二进制数据加密为二进制数据并解密

转载 作者:太空宇宙 更新时间:2023-11-04 05:19:21 25 4
gpt4 key购买 nike

<分区>

我想将二进制数据加密成二进制,然后再以二进制解密。我怎么能在 python 中做到这一点?我尝试使用 AES 但未能成功。

 Key = '00000000’
des = DES.new(key', DES.MODE_ECB)
plain_text = "10101011"
#encryption
cipher_text = des.encrypt(plain_text)
#decryption
decrypted_pt = des.decrypt(cipher_text)

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com