From 5ea1621c724e765c9a642a1b3b6e83419fda920b Mon Sep 17 00:00:00 2001 From: Francisco Couzo Date: Mon, 7 Sep 2020 05:59:36 -0300 Subject: [PATCH] Fixed #31985 -- Corrected salted_hmac()'s docstring about supported algorithms. salted_hmac() validates supported algorithms by checking hashlib methods. --- django/utils/crypto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/utils/crypto.py b/django/utils/crypto.py index db19db91d3..3837e64e05 100644 --- a/django/utils/crypto.py +++ b/django/utils/crypto.py @@ -20,7 +20,7 @@ def salted_hmac(key_salt, value, secret=None, *, algorithm='sha1'): """ Return the HMAC of 'value', using a key generated from key_salt and a secret (which defaults to settings.SECRET_KEY). Default algorithm is SHA1, - but any algorithm name supported by hashlib.new() can be passed. + but any algorithm name supported by hashlib can be passed. A different key_salt should be passed in for every application of HMAC. """