Simple use of RSA for asymmetric encryption and signature | 简单使用 rsa 进行非对称加密和签名
Project description
myrsa
Simple use of RSA for asymmetric encryption and signature
简单使用 rsa 进行非对称加密和签名
Installation
pip install myrsa
Usage:
import myrsa
pubkey, prikey = myrsa.newkeys()
print((pubkey, prikey))
message = 'Hello@世界'
crypto = myrsa.encrypt(message, pubkey)
print(crypto)
message = myrsa.decrypt(crypto, prikey)
print(message)
signature = myrsa.sign(message, prikey)
print(signature)
verified = myrsa.verify(message, signature, pubkey)
print(verified)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
myrsa-0.0.1.tar.gz
(2.5 kB
view hashes)