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.0.tar.gz
(8.3 kB
view details)
Built Distribution
File details
Details for the file crypto_plus-1.0.0.tar.gz
.
File metadata
- Download URL: crypto_plus-1.0.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5059d3d2e07dcbdae45a7ae0e40ca8ea0397f507c57cb38046254fa87a3d96c2 |
|
MD5 | ee5fca0d47d47afb9ac34d87a418c70a |
|
BLAKE2b-256 | cba69ff008f506ddd8660b8d452df89175f1d5205828c24d58ce2d9df0565f66 |
File details
Details for the file crypto_plus-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: crypto_plus-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ba09503a5e6e550c941f81b06d5f219a4ea293ab7a508a16cc6a46e4456a309 |
|
MD5 | 1bdc13fdf26fb30e7261f6b3bbca9367 |
|
BLAKE2b-256 | 4ff0af4ab541de07bbb6cb1e56b0617fd5ee5e950a7771af9a60b5fd84413f7a |