{ "info": { "author": "yanghui", "author_email": "578942267@qq.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Python-SecureHTTP\n=================\n\n\u901a\u8fc7\u4f7f\u7528RSA+AES\u8ba9HTTP\u4f20\u8f93\u66f4\u52a0\u5b89\u5168\uff0c\u5373C/S\u67b6\u6784\u7684\u52a0\u5bc6\u901a\u4fe1!(Make HTTP transmissions more secure via RSA+AES, encrypted communication for C/S architecture.)\n\n|Build Status| |Documentation Status| |codecov| |PyPI| |Pyversions| |Implementation| |link996|\n\n\u4f7f\u7528\u6982\u8ff0(Overview)\n~~~~~~~~~~~~~~~~~~\n\n**\u5b89\u88c5(Installation)\uff1a**\n\n.. code:: bash\n\n # \u6b63\u5f0f\u7248(Release)\n $ pip install -U PySecureHTTP\n # \u5f00\u53d1\u7248(Dev)\n $ pip install -U git+git+https://github.com/cisco08/PythonWeb-SecureHTTP@master\n\n\n**\u793a\u4f8b\u4ee3\u7801(Examples)\uff1a**\n\n1. AES\u52a0\u5bc6\u3001\u89e3\u5bc6\n\n .. code:: python\n\n from SecureHTTP import AESEncrypt, AESDecrypt\n # \u52a0\u5bc6\u540e\u7684\u5bc6\u6587\n ciphertext = AESEncrypt('ThisIsASecretKey', 'Hello World!')\n # \u89e3\u5bc6\u540e\u7684\u660e\u6587\n plaintext = AESDecrypt(\"ThisIsASecretKey\", ciphertext)\n\n2. RSA\u52a0\u5bc6\u3001\u89e3\u5bc6\n\n .. code:: python\n\n from SecureHTTP import RSAEncrypt, RSADecrypt, generate_rsa_keys\n # \u751f\u6210\u5bc6\u94a5\u5bf9\n (pubkey, privkey) = generate_rsa_keys(incall=True)\n # \u52a0\u5bc6\u540e\u7684\u5bc6\u6587\n ciphertext = RSAEncrypt(pubkey, 'Hello World!')\n # \u89e3\u5bc6\u540e\u7684\u660e\u6587\n plaintext = RSADecrypt(privkey, ciphertext)\n\n3. C/S\u52a0\u89e3\u5bc6\u793a\u4f8b\uff1a\n\n .. code:: python\n\n # \u6a21\u62dfC/S\u8bf7\u6c42\n from SecureHTTP import EncryptedCommunicationClient, EncryptedCommunicationServer, generate_rsa_keys\n post = {u'a': 1, u'c': 3, u'b': 2, u'data': [\"a\", 1, None]}\n resp = {u'msg': None, u'code': 0}\n # \u751f\u6210\u5bc6\u94a5\u5bf9\n (pubkey, privkey) = generate_rsa_keys(incall=True)\n # \u521d\u59cb\u5316\u5ba2\u6237\u7aef\u7c7b\n client = EncryptedCommunicationClient(pubkey)\n # \u521d\u59cb\u5316\u670d\u52a1\u7aef\u7c7b\n server = EncryptedCommunicationServer(privkey)\n # NO.1 \u5ba2\u6237\u7aef\u52a0\u5bc6\u6570\u636e\n c1 = client.clientEncrypt(post)\n # NO.2 \u670d\u52a1\u7aef\u89e3\u5bc6\u6570\u636e\n s1 = server.serverDecrypt(c1)\n # NO.3 \u670d\u52a1\u7aef\u8fd4\u56de\u52a0\u5bc6\u6570\u636e\n s2 = server.serverEncrypt(resp)\n # NO.4 \u5ba2\u6237\u7aef\u83b7\u53d6\u8fd4\u56de\u6570\u636e\u5e76\u89e3\u5bc6\n c2 = client.clientDecrypt(s2)\n # \u4ee5\u4e0a\u56db\u4e2a\u6b65\u9aa4\u5373\u5b8c\u6210\u4e00\u6b21\u8bf7\u6c42/\u54cd\u5e94\n\n\n\u8bf4\u5728\u540e\u9762(END)\n~~~~~~~~~~~~~\n\n\u6b22\u8fce\u63d0\u4ea4PR\u3001\u5171\u540c\u5f00\u53d1\uff01\n\n.. |Build Status| image:: https://travis-ci.com/staugur/Python-SecureHTTP.svg?branch=master\n :target: https://travis-ci.com/staugur/Python-SecureHTTP\n.. |Documentation Status| image:: https://readthedocs.org/projects/python-securehttp/badge/?version=latest\n :target: https://python-securehttp.readthedocs.io/zh_CN/latest/?badge=latest\n.. |codecov| image:: https://codecov.io/gh/staugur/Python-SecureHTTP/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/staugur/Python-SecureHTTP\n.. |PyPI| image:: https://img.shields.io/pypi/v/SecureHTTP.svg?style=popout\n :target: https://pypi.org/project/SecureHTTP\n.. |Pyversions| image:: https://img.shields.io/pypi/pyversions/SecureHTTP.svg\n :target: https://pypi.org/project/SecureHTTP\n.. |Implementation| image:: https://img.shields.io/pypi/implementation/SecureHTTP.svg\n :target: https://pypi.org/project/SecureHTTP\n.. |link996| image:: https://img.shields.io/badge/link-996.icu-red.svg\n :target: https://996.icu\n :alt: 996.ICU\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/cisco08/PythonWeb-SecureHTTP/releases/tag/v1.0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cisco08/PythonWeb-SecureHTTP", "keywords": "RSA,AES,MD5,HTTP", "license": "BSD 3-Clause", "maintainer": "", "maintainer_email": "", "name": "PySecureHTTP", "package_url": "https://pypi.org/project/PySecureHTTP/", "platform": "any", "project_url": "https://pypi.org/project/PySecureHTTP/", "project_urls": { "Download": "https://github.com/cisco08/PythonWeb-SecureHTTP/releases/tag/v1.0.1", "Homepage": "https://github.com/cisco08/PythonWeb-SecureHTTP" }, "release_url": "https://pypi.org/project/PySecureHTTP/1.0.1/", "requires_dist": [ "pycryptodomex (>=3.7.2)" ], "requires_python": "", "summary": "Make HTTP transmissions more secure, encrypted communication for C/S B/S architecture.", "version": "1.0.1" }, "last_serial": 5386222, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "2cdffd7cdaa6ce8bf2c7c50e541141cc", "sha256": "4a193a21b57105129713923e528ee571867a78293aeaf271a5dca08340482c4d" }, "downloads": -1, "filename": "PySecureHTTP-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2cdffd7cdaa6ce8bf2c7c50e541141cc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11598, "upload_time": "2019-06-11T11:53:58", "url": "https://files.pythonhosted.org/packages/6f/a3/18ab8cd20c3c26f6b4794f76347ecfcd67c2cada14736beb4c91a0351518/PySecureHTTP-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58a50922d7f9bbbd2b4daab4231c64b3", "sha256": "86f073bd7b228740936895937d44a68e6eb6d96cdfdddfe9e5bc7e172a2d8dbb" }, "downloads": -1, "filename": "PySecureHTTP-1.0.1.tar.gz", "has_sig": false, "md5_digest": "58a50922d7f9bbbd2b4daab4231c64b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10801, "upload_time": "2019-06-11T11:54:01", "url": "https://files.pythonhosted.org/packages/a8/75/95ec0288acec0646189fab38b65722b0dd59d1fe2464233d7fb5e3ee7c9b/PySecureHTTP-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2cdffd7cdaa6ce8bf2c7c50e541141cc", "sha256": "4a193a21b57105129713923e528ee571867a78293aeaf271a5dca08340482c4d" }, "downloads": -1, "filename": "PySecureHTTP-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2cdffd7cdaa6ce8bf2c7c50e541141cc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11598, "upload_time": "2019-06-11T11:53:58", "url": "https://files.pythonhosted.org/packages/6f/a3/18ab8cd20c3c26f6b4794f76347ecfcd67c2cada14736beb4c91a0351518/PySecureHTTP-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58a50922d7f9bbbd2b4daab4231c64b3", "sha256": "86f073bd7b228740936895937d44a68e6eb6d96cdfdddfe9e5bc7e172a2d8dbb" }, "downloads": -1, "filename": "PySecureHTTP-1.0.1.tar.gz", "has_sig": false, "md5_digest": "58a50922d7f9bbbd2b4daab4231c64b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10801, "upload_time": "2019-06-11T11:54:01", "url": "https://files.pythonhosted.org/packages/a8/75/95ec0288acec0646189fab38b65722b0dd59d1fe2464233d7fb5e3ee7c9b/PySecureHTTP-1.0.1.tar.gz" } ] }