Python RSA加密实战:生成密钥、加密明文
import rsa
# 生成公钥和私钥
(n, e, d) = 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/laCU 著作权归作者所有。请勿转载和采集!