Fixed obsolete comment in django.utils.crypto.salted_hmac().
Obsolete since 13864703bc
.
This commit is contained in:
parent
b5a62bd17d
commit
c5e373d48c
|
@ -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
|
# passing the key_salt and our base key through a pseudo-random function and
|
||||||
# SHA1 works nicely.
|
# SHA1 works nicely.
|
||||||
key = hashlib.sha1(key_salt + secret).digest()
|
key = hashlib.sha1(key_salt + secret).digest()
|
||||||
|
# If len(key_salt + secret) > block size of the hash algorithm, the above
|
||||||
# If len(key_salt + secret) > sha_constructor().block_size, the above
|
|
||||||
# line is redundant and could be replaced by key = key_salt + secret, since
|
# 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.
|
# the hmac module does the same thing for keys longer than the block size.
|
||||||
# However, we need to ensure that we *always* do this.
|
# However, we need to ensure that we *always* do this.
|
||||||
|
|
Loading…
Reference in New Issue