RealRsa


NameRealRsa JSON
Version 0.0.7 PyPI version JSON
download
home_pageNone
Summarypython version of rsa
upload_time2024-11-22 15:34:25
maintainerNone
docs_urlNone
authorzkh
requires_pythonNone
licenseMIT License
keywords rsa
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python RSA加解密封装

解除只能用公钥加密的限制



## 示例

```python
from RealRsa import Rsa


pyrsa = Rsa()

pub_key = """
-----BEGIN RSA PUBLIC KEY-----
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END RSA PUBLIC KEY-----
"""

data = "1bff1dfb66a599777dfe4d5edad268d41866e8f82d9604d6b750e2106b292cf2e11690420f515c3fe06d5fe851dc977e1eb3f0f610881659cb8fbf78e3e0dbc260dd7876146fc2b0e24a059fdf4d9540e8b1f9f755006085f491980248c345da03ff50edb77561bc5a304dc9ab658540cfbed4ebf828a351058abe7af508d5a19fa8dce65955d4f535618cba8fa115454fac166bf53784d51f319a56e3de071d766bda8c1683a74f10c9ee873daa710d233b53bcf8cbf7e0f9e48c13d9a1096ee3971c7c35b1b4bf4a4c6cdb4518c75147d5a21ed17fe161075baad4512ab3d4cf994f1bd5ca983fbf255f65b6a5d321ed68999cbff9b7e1b5dc9fc358d7a247"

ret = pyrsa.pub_decrypt(bytes.fromhex(data), pub_key)
print(ret)

ret = pyrsa.pub_encrypt("23342321",pub_key)
print(ret)
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "RealRsa",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "rsa",
    "author": "zkh",
    "author_email": "404937333@qq.com",
    "download_url": "https://files.pythonhosted.org/packages/4d/6d/3e25da5994535b116461e0412122bf7c2b64d2b0f15cbef54c69e38fc412/realrsa-0.0.7.tar.gz",
    "platform": "Windows",
    "description": "# Python RSA\u52a0\u89e3\u5bc6\u5c01\u88c5\r\n\r\n\u89e3\u9664\u53ea\u80fd\u7528\u516c\u94a5\u52a0\u5bc6\u7684\u9650\u5236\r\n\r\n\r\n\r\n## \u793a\u4f8b\r\n\r\n```python\r\nfrom RealRsa import Rsa\r\n\r\n\r\npyrsa = Rsa()\r\n\r\npub_key = \"\"\"\r\n-----BEGIN RSA PUBLIC KEY-----\r\nxxxxxxxxxxxxxxxxxxxxxxxxxxxx\r\n-----END RSA PUBLIC KEY-----\r\n\"\"\"\r\n\r\ndata = \"1bff1dfb66a599777dfe4d5edad268d41866e8f82d9604d6b750e2106b292cf2e11690420f515c3fe06d5fe851dc977e1eb3f0f610881659cb8fbf78e3e0dbc260dd7876146fc2b0e24a059fdf4d9540e8b1f9f755006085f491980248c345da03ff50edb77561bc5a304dc9ab658540cfbed4ebf828a351058abe7af508d5a19fa8dce65955d4f535618cba8fa115454fac166bf53784d51f319a56e3de071d766bda8c1683a74f10c9ee873daa710d233b53bcf8cbf7e0f9e48c13d9a1096ee3971c7c35b1b4bf4a4c6cdb4518c75147d5a21ed17fe161075baad4512ab3d4cf994f1bd5ca983fbf255f65b6a5d321ed68999cbff9b7e1b5dc9fc358d7a247\"\r\n\r\nret = pyrsa.pub_decrypt(bytes.fromhex(data), pub_key)\r\nprint(ret)\r\n\r\nret = pyrsa.pub_encrypt(\"23342321\",pub_key)\r\nprint(ret)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "python version of rsa",
    "version": "0.0.7",
    "project_urls": null,
    "split_keywords": [
        "rsa"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d62745aea4b8bf2c90ce914c4321c499a50cf494f27a5164041c44d5201044e1",
                "md5": "8dbf618ffe5157d308d05a144e3cad17",
                "sha256": "571d3ef62e3bb73591b00e512c0ef489d0df6b5d5bdee2e50dc2dd8e380978c0"
            },
            "downloads": -1,
            "filename": "RealRsa-0.0.7-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "8dbf618ffe5157d308d05a144e3cad17",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 29668,
            "upload_time": "2024-11-22T15:34:24",
            "upload_time_iso_8601": "2024-11-22T15:34:24.018993Z",
            "url": "https://files.pythonhosted.org/packages/d6/27/45aea4b8bf2c90ce914c4321c499a50cf494f27a5164041c44d5201044e1/RealRsa-0.0.7-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4d6d3e25da5994535b116461e0412122bf7c2b64d2b0f15cbef54c69e38fc412",
                "md5": "566c1c2990df0a927baed4cbf0b0ad8b",
                "sha256": "3b316f9e9e769521d295516dacc0f269bedc472ae69778a036020e1d11cd7877"
            },
            "downloads": -1,
            "filename": "realrsa-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "566c1c2990df0a927baed4cbf0b0ad8b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 59862,
            "upload_time": "2024-11-22T15:34:25",
            "upload_time_iso_8601": "2024-11-22T15:34:25.961628Z",
            "url": "https://files.pythonhosted.org/packages/4d/6d/3e25da5994535b116461e0412122bf7c2b64d2b0f15cbef54c69e38fc412/realrsa-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 15:34:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "realrsa"
}
        
zkh
Elapsed time: 0.43891s