密码-RSA
Cyber-RSA的Python项目详细描述
赛博RSA
生成密码的python包。
用法
RSA是一个非对称系统, 这意味着将生成一个密钥对, 公钥和私钥, 显然,你要保护你的私钥,并把它传给公众。
Import CyberRSA
encoded = encrypt(message, PublicKey())
decoded = decrypt(encoded, PrivateKey())
message- Message to encrypt
PublicKey - To read the public key from PEM file.
PrivateKey - To read the Private key from PEM file.
generate_keys() - Using this function we can generate public key and private key PEM file in oneshot (PEM file available in parent directory of the python script).
encoded - Encrypted message send across network.
decoded - Decrypted message.