Skip to main content

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


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

Uploaded Source

Built Distribution

crypto_plus-1.0.4-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crypto_plus-1.0.4.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for crypto_plus-1.0.4.tar.gz
Algorithm Hash digest
SHA256 a0e00c387999b5f6c73cebfdbf396f574d0b401d85028cdd44a1d9927c7ccd9b
MD5 51dfd576100e3c3db2cc5deed04c152a
BLAKE2b-256 895dc9c4ca4dad032040620022625ea74945e0a0630a5bdcdb6db8144d078df1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crypto_plus-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for crypto_plus-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6f1cdd063a0094b4a0948eae2c723152e6d548e3a83d49b46554b935937d2bde
MD5 cd67b8d202384220dff4829b1a193c58
BLAKE2b-256 f2fac230b215cf61e6c6191fe41915892af7d16b22f21b3ea6e2522bb2b48eca

See more details on using hashes here.

Supported by

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