Crypto Plus
1. 概览
一个易用的加解密、签名、证书工具,支持多种加密算法(如 RSA、DSA、ECDSA),并提供便捷的文件导入导出功能。 目前已发布到 PyPI。
项目特点
- 支持多种加密算法:RSA、DSA、ECDSA。
- 提供加解密、签名验签功能。
- 支持自签名证书的生成与导出。
- 易于集成,支持文件导入导出。
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) == plaintext
# 签名、验签
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. 开发
阅读 开发手册。
贡献指南
欢迎贡献代码!请参考以下步骤:
- Fork 本仓库。
- 创建一个新的分支:
git checkout -b feature-branch。 - 提交您的更改:
git commit -m 'Add some feature'。 - 推送到分支:
git push origin feature-branch。 - 创建一个 Pull Request。
我们期待您的贡献!
Metadata
Release files for crypto_plus 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| crypto_plus-1.0.8.tar.gz | 8.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crypto_plus-1.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.4 kB
Release files / crypto_plus-1.0.8.tar.gz
| Download URL | crypto_plus-1.0.8.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49357cd46e61913e28bb160e786af856883281a3e93587938436f79726722c1d
|
|
BLAKE2b-256 checksum How to use checksums |
6140aba10841a592124f7a60458fb45531572f80eeabe04dc6129f57497bcdd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / crypto_plus-1.0.8-py3-none-any.whl
| Download URL | crypto_plus-1.0.8-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d0f8087cc4199a77c9e215e114cf47834b6ff3b1fd95ee87ad84232b00d0bfd
|
|
BLAKE2b-256 checksum How to use checksums |
8950a45b80aae2430cf8cb70c25d37312a6d027c82b9d17d72ab01255492863e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for crypto_plus 1.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.