Skip to content

taojy123/myrsa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

简单使用 rsa 进行非对称加密和签名

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages