summaryrefslogtreecommitdiffstats
path: root/Lib/crypt.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742)Shreenidhi Shedi2022-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | If kernel fips is enabled, we get permission error upon doing `import crypt`. So, if kernel fips is enabled, disable the unallowed hashing methods. Python 3.9.1 (default, May 10 2022, 11:36:26) [GCC 10.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import crypt Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.9/crypt.py", line 117, in <module> _add_method('MD5', '1', 8, 34) File "/usr/lib/python3.9/crypt.py", line 94, in _add_method result = crypt('', salt) File "/usr/lib/python3.9/crypt.py", line 82, in crypt return _crypt.crypt(word, salt) PermissionError: [Errno 1] Operation not permitted Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
* gh-91217: deprecate crypt (GH-91459)Brett Cannon2022-04-121-0/+4
|
* closes bpo-38402: Check error of primitive crypt/crypt_r. (GH-16599)Antonio Gutierrez2019-10-081-1/+9
| | | | | | | Checks also for encryption algorithms methods not supported in different OSs. Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
* bpo-25172: Raise appropriate ImportError msg when crypt module used on ↵shireenrao2019-08-081-1/+10
| | | | Windows (GH-15149)
* bpo-31702: Allow to specify rounds for SHA-2 hashing in crypt.mksalt(). (#4110)Serhiy Storchaka2017-11-161-8/+28
| | | | The log_rounds parameter for Blowfish has been replaced with the rounds parameter.
* bpo-31664: Add support for the Blowfish method in crypt. (#3854)Serhiy Storchaka2017-10-241-12/+34
|
* Issue #25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's notVictor Stinner2015-10-021-2/+1
| | | | | supported. Check if it is supported, it may not be supported on OpenBSD for example.
* Issue #18405: Improve the entropy of crypt.mksalt().Victor Stinner2013-08-131-1/+1
|
* white space cleanupChristian Heimes2012-06-271-1/+0
|
* Issue 10924: Fixed mksalt() to use a RNG that is suitable for cryptographic ↵Christian Heimes2012-06-271-7/+8
| | | | purpose
* A crypt algorithm may not be available by returning None.Brett Cannon2011-02-221-2/+7
|
* Make Lib/crypt.py meet PEP 8 standards. This also led to a tweak in the new APIBrett Cannon2011-02-221-44/+40
| | | | by making methods() into a module attribute as it is statically calculated.
* Issue #10924: Adding salt and Modular Crypt Format to crypt library.Sean Reifscheider2011-02-221-0/+61