import rsa

# 生成密钥对
(n, e, d), (p, q) = rsa.newkeys(512)

# 加密明文
message = b'meet at the nature park at seven'
ciphertext = rsa.encrypt(message, rsa.PublicKey(n, e))

print(ciphertext)
导入rsa模块随机产生npqe和d对明文meet at the nature park at seven 进行加密运算求密文是多少?只显示代码

原文地址: https://www.cveoy.top/t/topic/gAb0 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录