diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-01-15 11:58:01 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-01-15 12:53:21 +0100 |
| commit | c5e373d48cbdd923575956fed477b63d66d9603f (patch) | |
| tree | a97a250c95576b31219bb0302bd316a022ac1089 /django/utils/crypto.py | |
| parent | b5a62bd17db0e28e6842111034fa6714d0701edb (diff) | |
Fixed obsolete comment in django.utils.crypto.salted_hmac().
Obsolete since 13864703bc1d5dd4dac63c96c6a4b42a392bc57f.
Diffstat (limited to 'django/utils/crypto.py')
| -rw-r--r-- | django/utils/crypto.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/utils/crypto.py b/django/utils/crypto.py index eeb55af066..4ec1cfcf77 100644 --- a/django/utils/crypto.py +++ b/django/utils/crypto.py @@ -26,8 +26,7 @@ def salted_hmac(key_salt, value, secret=None): # passing the key_salt and our base key through a pseudo-random function and # SHA1 works nicely. key = hashlib.sha1(key_salt + secret).digest() - - # If len(key_salt + secret) > sha_constructor().block_size, the above + # If len(key_salt + secret) > block size of the hash algorithm, the above # line is redundant and could be replaced by key = key_salt + secret, since # the hmac module does the same thing for keys longer than the block size. # However, we need to ensure that we *always* do this. |
