Name | crypto_plus JSON |
Version |
1.0.6
JSON |
| download |
home_page | None |
Summary | A Easy-to-use Crypto Tool |
upload_time | 2024-09-08 13:39:52 |
maintainer | None |
docs_url | None |
author | wmymz |
requires_python | >=3.6 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# [Crypto Plus](https://github.com/qy527145/crypto_plus)
## 1. 概览
一个易用的加解密、签名、证书工具。
目前已发布到[pypi](https://pypi.org/project/crypto_plus)。
## 2. 使用
### 2.1 安装
```bash
pip install crypto_plus
```
### 2.2 使用
```python
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. 开发
阅读 [开发手册](./docs/development.md).
Raw data
{
"_id": null,
"home_page": null,
"name": "crypto_plus",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "wmymz",
"author_email": "wmymz@icloud.com",
"download_url": "https://files.pythonhosted.org/packages/00/c1/c83fadfe7237364afde80fcf4141c56c89608eec2a98935d5ced0275503f/crypto_plus-1.0.6.tar.gz",
"platform": null,
"description": "# [Crypto Plus](https://github.com/qy527145/crypto_plus)\n\n## 1. \u6982\u89c8\n\n\u4e00\u4e2a\u6613\u7528\u7684\u52a0\u89e3\u5bc6\u3001\u7b7e\u540d\u3001\u8bc1\u4e66\u5de5\u5177\u3002\n\u76ee\u524d\u5df2\u53d1\u5e03\u5230[pypi](https://pypi.org/project/crypto_plus)\u3002\n\n\n## 2. \u4f7f\u7528\n\n### 2.1 \u5b89\u88c5\n\n```bash\npip install crypto_plus\n```\n\n### 2.2 \u4f7f\u7528\n\n```python\nfrom crypto_plus import CryptoPlus\n\n# \u76ee\u524d\u652f\u6301RSA\u3001DSA\u3001ECDSA\nrsa = CryptoPlus.generate_rsa()\n# dsa = CryptoPlus.generate_dsa()\n# ecdsa = CryptoPlus.generate_ecdsa()\n\n# \u52a0\u89e3\u5bc6\nplaintext = b'plaintext bytes'\nciphertext = rsa.encrypt(plaintext)\nassert rsa.decrypt(ciphertext) == ciphertext\n\n# \u7b7e\u540d\u3001\u9a8c\u7b7e\nmessage = b'message bytes'\nsignature = rsa.sign(message)\nrsa.verify(message, signature)\n\n# \u5bfc\u51fa\u81ea\u7b7e\u540d\u8bc1\u4e66\nrsa.dump_cert(subject_name=\"subject\", issuer_name=\"issuer\")\n\n# \u5bfc\u5165\u5bfc\u51fa\u6587\u4ef6\nrsa.dump()\nrsa_from_file = CryptoPlus.load()\n\n```\n\n## 3. \u5f00\u53d1\n\n\u9605\u8bfb [\u5f00\u53d1\u624b\u518c](./docs/development.md).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Easy-to-use Crypto Tool",
"version": "1.0.6",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e61464397b2f8676b226970615ab74ab515cf49209e2609a57cb105eac87195a",
"md5": "a6ef9b803c93103eda72380c3103e663",
"sha256": "43f4906d27bb1199465d147361eba747a7732e196ea605bfb1c69c74e3710c1b"
},
"downloads": -1,
"filename": "crypto_plus-1.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a6ef9b803c93103eda72380c3103e663",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 10454,
"upload_time": "2024-09-08T13:39:50",
"upload_time_iso_8601": "2024-09-08T13:39:50.725729Z",
"url": "https://files.pythonhosted.org/packages/e6/14/64397b2f8676b226970615ab74ab515cf49209e2609a57cb105eac87195a/crypto_plus-1.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "00c1c83fadfe7237364afde80fcf4141c56c89608eec2a98935d5ced0275503f",
"md5": "5f4eb3d1bd8774560472500bfd9cb4fd",
"sha256": "0e5322ad0149e2d2a67b6f70f0e6ce8e6b2a4657ef04bf439760f6589c37f207"
},
"downloads": -1,
"filename": "crypto_plus-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "5f4eb3d1bd8774560472500bfd9cb4fd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 9127,
"upload_time": "2024-09-08T13:39:52",
"upload_time_iso_8601": "2024-09-08T13:39:52.171757Z",
"url": "https://files.pythonhosted.org/packages/00/c1/c83fadfe7237364afde80fcf4141c56c89608eec2a98935d5ced0275503f/crypto_plus-1.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-08 13:39:52",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "crypto_plus"
}