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.8.tar.gz (8.6 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.8-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crypto_plus-1.0.8.tar.gz
  • Upload date:
  • Size: 8.6 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.8.tar.gz
Algorithm Hash digest
SHA256 49357cd46e61913e28bb160e786af856883281a3e93587938436f79726722c1d
MD5 740bde4d65a281db884abe3648fe9d17
BLAKE2b-256 6140aba10841a592124f7a60458fb45531572f80eeabe04dc6129f57497bcdd0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crypto_plus-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 10.8 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1d0f8087cc4199a77c9e215e114cf47834b6ff3b1fd95ee87ad84232b00d0bfd
MD5 3eba1cc902289cea0f1afc1e3458cfa2
BLAKE2b-256 8950a45b80aae2430cf8cb70c25d37312a6d027c82b9d17d72ab01255492863e

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