Skip to main content

A Easy-to-use Crypto Tool

Project description

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. 开发

阅读 开发手册

贡献指南

欢迎贡献代码!请参考以下步骤:

  1. Fork 本仓库。
  2. 创建一个新的分支:git checkout -b feature-branch
  3. 提交您的更改:git commit -m 'Add some feature'
  4. 推送到分支:git push origin feature-branch
  5. 创建一个 Pull Request。

我们期待您的贡献!

Project details


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.7.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crypto_plus-1.0.7-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file crypto_plus-1.0.7.tar.gz.

File metadata

  • Download URL: crypto_plus-1.0.7.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for crypto_plus-1.0.7.tar.gz
Algorithm Hash digest
SHA256 b62d4636b9cedeae42c3f0e617dc7c19430188c919724d88734f81de46ffc3ae
MD5 773f0b73b8a216737a3cfbb4ddc7a45a
BLAKE2b-256 c7c5e3393e85523958a7fa6285a79ee84506015f7c2dbcff5b4454f7216142fa

See more details on using hashes here.

File details

Details for the file crypto_plus-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: crypto_plus-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for crypto_plus-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e66b86a22c5181c8891875e5a247b7fd47bef0d8721d2ea177ceb543433bc9e6
MD5 70140d54ec6ab10446404314297f8297
BLAKE2b-256 b4f062f086a3f6a734af471f7d3592e9db5d9f8c7db9e5b83c4880d96fda27b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page