{ "info": { "author": "Peio Popov", "author_email": "peio@peio.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Education", "License :: Public Domain", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Security :: Cryptography" ], "description": "Padding - Padding methods for password based encryption\n---------------------------------------------\n\nAppend and remove padding to/from a string. \n\nI. Functions:\nappendPadding(str, blocksize=AES_blocksize, mode='CMS'):\n Pad (append padding to) string for use with symmetric encryption algorithm\n Input: (string) str - String to be padded\n (int) blocksize - block size of the encryption algorithm. Usually 8 or 16 bytes\n (string) mode - padding scheme one in (CMS, Bit, ZeroLen, Null, Space, Random)\n Return:(string) Padded string according to chosen padding mode\n\nremovePadding(str, blocksize=AES_blocksize, mode='CMS'):\n Remove padding from string \n Input: (str) str - String to be padded\n (int) blocksize - block size of the algorithm. Usually 8 or 16 bytes\n (string) mode - padding scheme one in (CMS, Bit, ZeroLen, Null, Space, Random)\n Return:(string) Decrypted string without padding\n\nII. Blocksizes:\nDES (Triple DES), CAST5 and Blowfish have block size of 64 bits = 8 bytes\nDES_blocksize = 8 \nCAST5_blocksize = 8\nBlowfish_blocksize = 8\n\nAES has fixed block size of 128 bits = 16 bytes and this is the default blocksize\nAES_blocksize = 16\n\nIII. Mode:\nMODES ={\n(0,'CMS') : 'Pad with bytes all of the same value as the number of padding bytes. Default mode used in Cryptographic Message Syntax (CMS as defined in RFC 5652, PKCS#5, PKCS#7 and RFC 1423 PEM)',\n(1,'Bit') : 'BitPadding: Pad with 0x80 (10000000) followed by zero (null) bytes. Described in ANSI X.923 and ISO/IEC 9797-1',\n(2,'ZeroLen') : 'Pad with zeroes except make the last byte equal to the number (length) of padding bytes',\n(3,'Null') : 'Pad with null bytes. Only for encrypting of text data.',\n(4,'Space') : 'Pad with spaces. Only for encrypting of text data.',\n(5,'Random') : 'ISO 10126 Padding (withdrawn in 2007): Pad with random bytes + last byte equal to the number of padding bytes' \n }\n\nCMS mode is the default one\n\nExamples in the README.txt file", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/Padding", "keywords": "padding,CMS,CMS Padding,Bit Padding,Null Padding,Random Padding,PKCS,RFC 5652,PKCS#5,PKCS#7,RFC 1423", "license": "Public Domain", "maintainer": "", "maintainer_email": "", "name": "Padding", "package_url": "https://pypi.org/project/Padding/", "platform": "", "project_url": "https://pypi.org/project/Padding/", "project_urls": { "Homepage": "http://pypi.python.org/pypi/Padding" }, "release_url": "https://pypi.org/project/Padding/0.5/", "requires_dist": null, "requires_python": "", "summary": "Padding methods for password based encryption", "version": "0.5" }, "last_serial": 4788279, "releases": { "0.4": [ { "comment_text": "", "digests": { "md5": "e1ec8c90cbeddba1f5ff6c5116f85fd3", "sha256": "7edb82139e1de6eb973f742d07751ee386b40c61259ed233b5bfe0bdf485a32a" }, "downloads": -1, "filename": "Padding-0.4.tar.gz", "has_sig": false, "md5_digest": "e1ec8c90cbeddba1f5ff6c5116f85fd3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3619, "upload_time": "2011-05-04T06:21:38", "url": "https://files.pythonhosted.org/packages/9a/d2/3faf7e81bc0de2f1c56ee396c7d36403d386409b1be10cec74afb876cc62/Padding-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "b7d9e935a774ba05406cd43c25367fff", "sha256": "8994b4d8720b733ddf697bc27ce17b672220c48c4a37eef1e7eaa30a4ad90308" }, "downloads": -1, "filename": "Padding-0.5.tar.gz", "has_sig": false, "md5_digest": "b7d9e935a774ba05406cd43c25367fff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3866, "upload_time": "2019-02-06T20:26:22", "url": "https://files.pythonhosted.org/packages/39/c6/400b6f20c0679fcca2d0d7d933e142d000a707a571a9068fd8297e88a781/Padding-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b7d9e935a774ba05406cd43c25367fff", "sha256": "8994b4d8720b733ddf697bc27ce17b672220c48c4a37eef1e7eaa30a4ad90308" }, "downloads": -1, "filename": "Padding-0.5.tar.gz", "has_sig": false, "md5_digest": "b7d9e935a774ba05406cd43c25367fff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3866, "upload_time": "2019-02-06T20:26:22", "url": "https://files.pythonhosted.org/packages/39/c6/400b6f20c0679fcca2d0d7d933e142d000a707a571a9068fd8297e88a781/Padding-0.5.tar.gz" } ] }