diff options
| author | Anton Samarchyan <anton.samarchyan@savoirfairelinux.com> | 2017-01-24 15:32:33 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-02-11 16:11:08 -0500 |
| commit | 9718fa2e8abe430c3526a9278dd976443d4ae3c6 (patch) | |
| tree | cc9e2c659759bbfdb4c7785c59a909cb2655af0d /django/utils/crypto.py | |
| parent | 98bcc5d81bca578f3a5b4d47907ba4ac40446887 (diff) | |
Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.
Diffstat (limited to 'django/utils/crypto.py')
| -rw-r--r-- | django/utils/crypto.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/crypto.py b/django/utils/crypto.py index db941615be..f6f44856d0 100644 --- a/django/utils/crypto.py +++ b/django/utils/crypto.py @@ -22,7 +22,7 @@ except NotImplementedError: def salted_hmac(key_salt, value, secret=None): """ - Returns the HMAC-SHA1 of 'value', using a key generated from key_salt and a + Return the HMAC-SHA1 of 'value', using a key generated from key_salt and a secret (which defaults to settings.SECRET_KEY). A different key_salt should be passed in for every application of HMAC. @@ -49,7 +49,7 @@ def get_random_string(length=12, allowed_chars='abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'): """ - Returns a securely generated random string. + Return a securely generated random string. The default length of 12 with the a-z, A-Z, 0-9 character set returns a 71-bit value. log_2((26+26+10)^12) =~ 71 bits |
