Python RSA 加密示例:使用 rsa 模块加密明文
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)
原文地址: https://www.cveoy.top/t/topic/owmw 著作权归作者所有。请勿转载和采集!