diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2013-08-14 01:39:14 +0200 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2013-08-14 01:39:14 +0200 |
| commit | 7f7b941fdcdfe28f3cd37e84bc5d7a298385b451 (patch) | |
| tree | c054580a869424e5b2b5df47f576f1929401db8a | |
| parent | 4bfa6c54ca0d8d51be01ce45436a7f26b9926018 (diff) | |
| download | cpython-git-7f7b941fdcdfe28f3cd37e84bc5d7a298385b451.tar.gz | |
Issue #18405: Improve the entropy of crypt.mksalt().
| -rw-r--r-- | Lib/crypt.py | 2 | ||||
| -rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/crypt.py b/Lib/crypt.py index b90c81cc40..49ab96e140 100644 --- a/Lib/crypt.py +++ b/Lib/crypt.py @@ -28,7 +28,7 @@ def mksalt(method=None): if method is None: method = methods[0] s = '${}$'.format(method.ident) if method.ident else '' - s += ''.join(_sr.sample(_saltchars, method.salt_chars)) + s += ''.join(_sr.choice(_saltchars) for char in range(method.salt_chars)) return s @@ -66,6 +66,8 @@ Core and Builtins Library ------- +- Issue #18405: Improve the entropy of crypt.mksalt(). + - Issue #18676: Change 'positive' to 'non-negative' in queue.py put and get docstrings and ValueError messages. Patch by Zhongyue Luo |
