{ "info": { "author": "Max Vetrov", "author_email": "maxvetrov555@yandex.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "Intended Audience :: Other Audience", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT 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 :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Education", "Topic :: Security :: Cryptography", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "========\nSecretPy\n========\n\n|PyPIpkg| |PythonV| |PythonImplement| |Docs| |Downloads| |License| |Travis|\n\n**Download:**\n\nhttps://pypi.org/project/secretpy\n\n**Documentation:**\n\nhttps://secretpy.readthedocs.io\n\n**Source code & Development:**\n\nhttps://github.com/tigertv/secretpy\n\nDescription\n===========\n\nSecretPy is a cryptographic Python package. It uses the following classical cipher algorithms:\n\n- ADFGX, ADFGVX\n- Affine\n- Atbash\n- Autokey\n- Bazeries\n- Beaufort\n- Bifid\n- Caesar, Caesar Progressive\n- Columnar Transposition\n- Keyword\n- Nihilist\n- Simple Substitution\n- Playfair, Two Square(Double Playfair), Three Square, Four Square\n- Polybius\n- Rot13, Rot5, Rot18, Rot47\n- Trifid\n- Vic\n- Vigenere, Gronsfeld, Porta\n- Zigzag(Railfence)\n\nInstallation\n============\n\nTo install this library, you can use pip:\n\n.. code-block:: bash\n\n\tpip install secretpy\n\nAlternatively, you can install the package using the repo's cloning and the make:\n\n.. code-block:: bash\n\n\tgit clone https://github.com/tigertv/secretpy\n\tcd secretpy\n\tmake install\n\nUsage\n=====\n\nDirect way\n----------\n\nThe cipher classes can encrypt only letters which exist in the alphabet, and they don't have a state.\n\n.. code-block:: python\n\n\t#!/usr/bin/python\n\t# -*- encoding: utf-8 -*-\n\n\tfrom secretpy import Caesar\n\tfrom secretpy import alphabet\n\n\talphabet = alphabet.GERMAN\n\tplaintext = u\"thequickbrownfoxjumpsoverthelazydog\"\n\tkey = 3\n\tcipher = Caesar()\n\n\tprint(plaintext)\n\tenc = cipher.encrypt(plaintext, key, alphabet)\n\tprint(enc)\n\tdec = cipher.decrypt(enc, key, alphabet)\n\tprint(dec)\n\n\tprint('=====================================')\n\n\tprint(plaintext)\n\t# use default english alphabet\n\tenc = cipher.encrypt(plaintext, key)\n\tprint(enc)\n\tdec = cipher.decrypt(enc, key)\n\tprint(dec)\n\n\t'''\n\tOutput:\n\n\tthequickbrownfoxjumpsoverthelazydog\n\twkhtxlfneurzqir\u00e4mxpsvryhuwkhod\u00fc\u00f6grj\n\tthequickbrownfoxjumpsoverthelazydog\n\t=====================================\n\tthequickbrownfoxjumpsoverthelazydog\n\twkhtxlfneurzqiramxpsvryhuwkhodcbgrj\n\tthequickbrownfoxjumpsoverthelazydog\n\t'''\n\nCryptMachine\n------------\n\n``CryptMachine`` saves state. There are alphabet, key and cipher, they can be changed in anytime.\nIn the previous example, plaintext contains only letters existing in the alphabet and in the lower case without spaces.\nTo change the behaviour, you can use ``CryptMachine`` and decorators(``UpperCase``, ``NoSpace``, ``SaveCase`` and etc.), so it's a preferred way to do encryption/decryption:\n\n.. code-block:: python\n\n\t#!/usr/bin/python\n\t# -*- encoding: utf-8 -*-\n\n\tfrom secretpy import Atbash \n\tfrom secretpy import Caesar\n\n\tfrom secretpy import CryptMachine \n\tfrom secretpy.cmdecorators import *\n\tfrom secretpy import alphabet\n\n\tdef encdec(machine, plaintext):\n\t print(plaintext)\n\t enc = machine.encrypt(plaintext)\n\t print(enc)\n\t dec = machine.decrypt(enc)\n\t print(dec)\n\t print(\"-----------------------------------\")\n\n\tplaintext = u\"thequickbrownfoxjumpsoverthelazydog\"\n\tkey = 3\n\tcipher = Caesar()\n\n\tcm = CryptMachine(cipher, key)\n\tencdec(cm, plaintext)\n\n\tcm.set_alphabet(alphabet.GERMAN)\n\tencdec(cm, plaintext)\n\n\tcm = SaveSpaces(cm)\n\tcm.set_key(9)\n\tplaintext = u\"the quick brown fox jumps over the lazy dog\"\n\tencdec(cm, plaintext)\n\n\tcm = NoSpaces(UpperCase(cm))\n\tcm.set_cipher(Atbash())\n\tplaintext = u\"Achtung Minen\"\n\tencdec(cm, plaintext)\n\n\t'''\n\tOutput:\n\n\tthequickbrownfoxjumpsoverthelazydog\n\twkhtxlfneurzqiramxpsvryhuwkhodcbgrj\n\tthequickbrownfoxjumpsoverthelazydog\n\t-----------------------------------\n\tthequickbrownfoxjumpsoverthelazydog\n\twkhtxlfneurzqir\u00e4mxpsvryhuwkhod\u00fc\u00f6grj\n\tthequickbrownfoxjumpsoverthelazydog\n\t-----------------------------------\n\tthe quick brown fox jumps over the lazy dog\n\t\u00fcqn z\u00dfrlt k\u00e4xbw oxc s\u00dfvy\u00f6 xan\u00e4 \u00fcqn ujed mxp\n\tthe quick brown fox jumps over the lazy dog\n\t-----------------------------------\n\tAchtung Minen\n\t\u00df\u00d6WKJQXRVQZQ\n\tACHTUNGMINEN\n\t-----------------------------------\n\t'''\n\nCompositeMachine\n----------------\n\nCombining several ciphers to get more complex cipher, you can use ``CompositeMachine``:\n\n.. code-block:: python\n\n\t#!/usr/bin/python\n\t# -*- encoding: utf-8 -*-\n\n\tfrom secretpy import Rot13\n\tfrom secretpy import Caesar\n\tfrom secretpy import CryptMachine\n\tfrom secretpy import CompositeMachine\n\tfrom secretpy.cmdecorators import *\n\n\tdef encdec(machine, plaintext):\n\t print(\"=======================================\")\n\t print(plaintext)\n\t enc = machine.encrypt(plaintext)\n\t print(enc)\n\t dec = machine.decrypt(enc)\n\t print(dec)\n\n\tkey = 5\n\tplaintext = u\"Dog jumps four times and cat six times\"\n\tprint(plaintext)\n\n\tcm1 = SaveSpaces(SaveCase(CryptMachine(Caesar(), key)))\n\tenc = cm1.encrypt(plaintext)\n\tprint(enc)\n\n\tcm2 = SaveSpaces(SaveCase(CryptMachine(Rot13())))\n\tenc = cm2.encrypt(enc)\n\tprint(enc)\n\n\tprint(\"=======================================\")\n\n\tcm = CompositeMachine(cm1)\n\tcm.add_machines(cm2)\n\tenc = cm.encrypt(plaintext)\n\tprint(enc)\n\n\tencdec(cm, plaintext)\n\n\tcm.add_machines(cm1, cm2)\n\tencdec(cm, plaintext)\n\n\t'''\n\tOutput:\n\n\tDog jumps four times and cat six times\n\tItl ozrux ktzw ynrjx fsi hfy xnc ynrjx\n\tVgy bmehk xgmj laewk sfv usl kap laewk\n\t=======================================\n\tVgy bmehk xgmj laewk sfv usl kap laewk\n\t=======================================\n\tDog jumps four times and cat six times\n\tVgy bmehk xgmj laewk sfv usl kap laewk\n\tDog jumps four times and cat six times\n\t=======================================\n\tDog jumps four times and cat six times\n\tNyq tewzc pyeb dswoc kxn mkd csh dswoc\n\tDog jumps four times and cat six times\n\t'''\n\nMaintainers\n===========\n\n- `@tigertv `_ (Max Vetrov)\n\n.. Images and Links \n\n.. |PyPIpkg| image:: https://img.shields.io/pypi/v/secretpy.svg?style=flat-square\n\t:alt: Go to PyPi\n\t:target: https://pypi.org/project/secretpy\n.. |PythonV| image:: https://img.shields.io/pypi/pyversions/secretpy.svg?style=flat-square\n\t:alt: Go to PyPi\n\t:target: https://pypi.org/project/secretpy\n.. |PythonImplement| image:: https://img.shields.io/pypi/implementation/secretpy.svg?style=flat-square\n\t:alt: Go to PyPi\n\t:target: https://pypi.org/project/secretpy\n.. |Docs| image:: https://img.shields.io/readthedocs/secretpy.svg?style=flat-square\n\t:alt: Read the Docs\n\t:target: https://secretpy.readthedocs.io/en/latest\n.. |Downloads| image:: https://img.shields.io/pypi/dm/secretpy.svg?style=flat-square\n\t:alt: Go to PyPi\n\t:target: https://pypi.org/project/secretpy\n.. |License| image:: https://img.shields.io/github/license/tigertv/secretpy.svg?style=flat-square\n\t:alt: Go to Github\n\t:target: https://github.com/tigertv/secretpy\n.. |Travis| image:: https://img.shields.io/travis/tigertv/secretpy/master.svg?style=flat-square\n\t:alt: Go to Travis\n\t:target: https://travis-ci.org/tigertv/secretpy\n\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tigertv/secretpy", "keywords": "classic ciphers cipher secret", "license": "", "maintainer": "", "maintainer_email": "", "name": "secretpy", "package_url": "https://pypi.org/project/secretpy/", "platform": "", "project_url": "https://pypi.org/project/secretpy/", "project_urls": { "Bug tracker": "https://github.com/tigertv/secretpy/issues", "Documentation": "https://secretpy.readthedocs.io", "Homepage": "https://github.com/tigertv/secretpy", "Source code": "https://github.com/tigertv/secretpy" }, "release_url": "https://pypi.org/project/secretpy/0.8.0/", "requires_dist": null, "requires_python": "", "summary": "Classical ciphers", "version": "0.8.0" }, "last_serial": 5302607, "releases": { "0.4.0": [ { "comment_text": "", "digests": { "md5": "03210fdc6d2bf6c5af2d912d3715443b", "sha256": "5c2157ca45c8a0e72a35ec1174f9f9d38b970b3939b8a957823ddaf42a2a36df" }, "downloads": -1, "filename": "secretpy-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "03210fdc6d2bf6c5af2d912d3715443b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30405, "upload_time": "2019-02-26T01:39:16", "url": "https://files.pythonhosted.org/packages/ab/f5/7007bc2c285f9d901101e9d27db09cb5bbd896a557e54c6262d73db1979d/secretpy-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "30f5090ebc12f08897842f7362af643a", "sha256": "f48d264b72724a00714468a5ea555149bde5e05411923240d19bfcdf318a9b23" }, "downloads": -1, "filename": "secretpy-0.4.0.tar.gz", "has_sig": false, "md5_digest": "30f5090ebc12f08897842f7362af643a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8530, "upload_time": "2019-02-26T01:39:18", "url": "https://files.pythonhosted.org/packages/03/89/32e19cd3d0eb910485277e8d8a9b5a6a9ddc6286176d3477bb11860801d3/secretpy-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "843b7156afbe7a9b6a02ddd2e736317f", "sha256": "fae373daea8e7062744c38a512dd1cd3ed792e4456b984495b14f760fad92bd6" }, "downloads": -1, "filename": "secretpy-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "843b7156afbe7a9b6a02ddd2e736317f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30498, "upload_time": "2019-02-26T02:11:08", "url": "https://files.pythonhosted.org/packages/bf/74/8cf4e58ce42b10e2126c944b0c4b4da56d761f98279ae1a4499cca4a0a7c/secretpy-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "188dc7bbf6b8c4646eaa0e528f781e34", "sha256": "1396f6390f271a2a1991ddcca9af6adfcacd942ee3e57f9217539adb7d7f169c" }, "downloads": -1, "filename": "secretpy-0.4.1.tar.gz", "has_sig": false, "md5_digest": "188dc7bbf6b8c4646eaa0e528f781e34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8679, "upload_time": "2019-02-26T02:11:10", "url": "https://files.pythonhosted.org/packages/20/35/223f3e9737a03cc4576ec926dbcbc386be3c5b36d07d4b0f377077162260/secretpy-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "f84bb0901c52a411a067f2de32f731d2", "sha256": "8d3bd37c6f17baa9918b93ee1e2773cdbcb30da8e1c5f6b0da04d98961564a6a" }, "downloads": -1, "filename": "secretpy-0.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f84bb0901c52a411a067f2de32f731d2", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 30894, "upload_time": "2019-02-27T03:37:36", "url": "https://files.pythonhosted.org/packages/2b/e4/f835337cd3c5b83e8f36db715f01eca75cd2dad982c88c77fb6df7f5fccf/secretpy-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a589bbd22def0d1a0acb467c9eb566f1", "sha256": "aec008a1f70fe9144a8ab55f3c2d6888517b884bf20c1d16d428480156768582" }, "downloads": -1, "filename": "secretpy-0.5.0.tar.gz", "has_sig": false, "md5_digest": "a589bbd22def0d1a0acb467c9eb566f1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9096, "upload_time": "2019-02-27T03:37:38", "url": "https://files.pythonhosted.org/packages/76/b3/4d756579b70c830718290b9952a33acb5eb24f3d3b0236045641b6847092/secretpy-0.5.0.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "5e11b83830bc2cb3d505433ae6ae842f", "sha256": "a04c764a6b92951d4c0e3cd379dd8295d7a9e8ea5b0d309a01692c97f91cf163" }, "downloads": -1, "filename": "secretpy-0.6.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e11b83830bc2cb3d505433ae6ae842f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23812, "upload_time": "2019-04-05T10:00:05", "url": "https://files.pythonhosted.org/packages/df/d1/4e54cf31aa97a488941bc058152e4b64a93e22d71c7a14f83ded2c0e0c26/secretpy-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ccffc4fb0357c67a97f417f51fbcda0", "sha256": "c7df2460f0b8e44a605c07d5b3aa75c310ce3f85ff7d30eacf79ec7f907d0c56" }, "downloads": -1, "filename": "secretpy-0.6.0.tar.gz", "has_sig": false, "md5_digest": "4ccffc4fb0357c67a97f417f51fbcda0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10682, "upload_time": "2019-04-05T10:00:07", "url": "https://files.pythonhosted.org/packages/0a/64/d08c5194d601e98abddb2c805a4257dd82d9acb530f5433801cd64a3c7f4/secretpy-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "b6a0ca05fc8810eb263abebd7ae9ed98", "sha256": "ad69e3ccca4e11ea4db9a099ff73f8f7c275efd1c49b866410f6ae2197e9b5c3" }, "downloads": -1, "filename": "secretpy-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b6a0ca05fc8810eb263abebd7ae9ed98", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 23811, "upload_time": "2019-04-05T10:35:29", "url": "https://files.pythonhosted.org/packages/35/bd/d1a277b22a5c66f62770b288e6f09110825f566370965b2aba68ee7d9474/secretpy-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4fe93ef113b4daa1ec40434c8b8afede", "sha256": "8afad355c3860eec9c96063688d86d6fdd41647bc00f03c10c69efb7acf0bd45" }, "downloads": -1, "filename": "secretpy-0.6.1.tar.gz", "has_sig": false, "md5_digest": "4fe93ef113b4daa1ec40434c8b8afede", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10684, "upload_time": "2019-04-05T10:35:31", "url": "https://files.pythonhosted.org/packages/43/78/5d080fd446c76e00eb58ffc30b5f7a7a7293b3311b79c7f4393269f23e69/secretpy-0.6.1.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "e42d2f9efda7ec52d6737e7682a6a56f", "sha256": "a0f263954d118b59aa0b01dfae06201147e571267a9967b8a907527105bd23ec" }, "downloads": -1, "filename": "secretpy-0.7.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e42d2f9efda7ec52d6737e7682a6a56f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26786, "upload_time": "2019-05-10T14:32:58", "url": "https://files.pythonhosted.org/packages/61/95/e25d56d29c6eabe6dd6ac7fe7fa0d066c2fcd101d12505cfa34ad358e510/secretpy-0.7.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01ed97c15a328c244e3e6667fccea2e9", "sha256": "2c239f4c64df718b48656ee75b0fd452fd313172105169387d458523c2bc01ee" }, "downloads": -1, "filename": "secretpy-0.7.0.tar.gz", "has_sig": false, "md5_digest": "01ed97c15a328c244e3e6667fccea2e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11920, "upload_time": "2019-05-10T14:32:59", "url": "https://files.pythonhosted.org/packages/3f/53/71e622697bd8c6376d1de8485c1c6bd002a30c7696148de5d17c4d71ea25/secretpy-0.7.0.tar.gz" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "001fdc59cb889790ebf3cebd3253d08f", "sha256": "ad5647b4fce4b8e3604e36f5dbf61d273dfbb9a8e0baeacbe4a4b09d20ae52a7" }, "downloads": -1, "filename": "secretpy-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "001fdc59cb889790ebf3cebd3253d08f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 33563, "upload_time": "2019-05-22T12:58:10", "url": "https://files.pythonhosted.org/packages/ec/af/471950d14160c5836db8b466bfcdfeb5198edd101771139f4a37b132f3cf/secretpy-0.8.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c92e5be1dfd82a2a13bd9925016ee00", "sha256": "0a45d59e6abf7bae05d05448acbde16288cbee44e6bc03eef9d7d7108af40917" }, "downloads": -1, "filename": "secretpy-0.8.0.tar.gz", "has_sig": false, "md5_digest": "1c92e5be1dfd82a2a13bd9925016ee00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14321, "upload_time": "2019-05-22T12:58:12", "url": "https://files.pythonhosted.org/packages/c3/2d/c92477d9a7b2257da8027065f7c8414aca603f3b2a62b55a2958f1b62812/secretpy-0.8.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "001fdc59cb889790ebf3cebd3253d08f", "sha256": "ad5647b4fce4b8e3604e36f5dbf61d273dfbb9a8e0baeacbe4a4b09d20ae52a7" }, "downloads": -1, "filename": "secretpy-0.8.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "001fdc59cb889790ebf3cebd3253d08f", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 33563, "upload_time": "2019-05-22T12:58:10", "url": "https://files.pythonhosted.org/packages/ec/af/471950d14160c5836db8b466bfcdfeb5198edd101771139f4a37b132f3cf/secretpy-0.8.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1c92e5be1dfd82a2a13bd9925016ee00", "sha256": "0a45d59e6abf7bae05d05448acbde16288cbee44e6bc03eef9d7d7108af40917" }, "downloads": -1, "filename": "secretpy-0.8.0.tar.gz", "has_sig": false, "md5_digest": "1c92e5be1dfd82a2a13bd9925016ee00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14321, "upload_time": "2019-05-22T12:58:12", "url": "https://files.pythonhosted.org/packages/c3/2d/c92477d9a7b2257da8027065f7c8414aca603f3b2a62b55a2958f1b62812/secretpy-0.8.0.tar.gz" } ] }