A Easy-to-use Crypto Tool
Project description
Crypto Plus
1. 概览
一个易用的加解密、签名、证书工具。 目前已发布到pypi。
2. 使用
2.1 安装
pip install crypto_plus
2.2 使用
from crypto_plus import CryptoPlus
# 目前支持RSA、DSA、ECDSA
rsa = CryptoPlus.generate_rsa()
# dsa = CryptoPlus.generate_dsa()
# ecdsa = CryptoPlus.generate_ecdsa()
# 加解密
plaintext = b'plaintext bytes'
ciphertext = rsa.encrypt(plaintext)
assert rsa.decrypt(ciphertext) == ciphertext
# 签名、验签
message = b'message bytes'
signature = rsa.sign(message)
rsa.verify(message, signature)
# 导出自签名证书
rsa.dump_cert(subject_name="subject", issuer_name="issuer")
# 导入导出文件
rsa.dump()
rsa_from_file = CryptoPlus.load()
3. 开发
阅读 开发手册.
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
crypto_plus-1.0.2.tar.gz
(8.6 kB
view hashes)
Built Distribution
Close
Hashes for crypto_plus-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eb13a6643155e107c7d88a41c2e8e9eb02d7d398365e8cfc29b0074e155dc5d |
|
MD5 | 9a7b8beb50d68c2c6a58dc3989ab976a |
|
BLAKE2b-256 | 085dc42741a2fdd98f9157d4c05dd5d1766d5c45a6d4e502e43a6ff29235b3ed |