summaryrefslogtreecommitdiff
path: root/test/unit/common/middleware/crypto/crypto_helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/common/middleware/crypto/crypto_helpers.py')
-rw-r--r--test/unit/common/middleware/crypto/crypto_helpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/common/middleware/crypto/crypto_helpers.py b/test/unit/common/middleware/crypto/crypto_helpers.py
index 085f9544c..333ca0faf 100644
--- a/test/unit/common/middleware/crypto/crypto_helpers.py
+++ b/test/unit/common/middleware/crypto/crypto_helpers.py
@@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import base64
-import hashlib
from swift.common.exceptions import UnknownSecretIdError
from swift.common.middleware.crypto.crypto_utils import Crypto
+from swift.common.utils import md5
def fetch_crypto_keys(key_id=None):
@@ -41,7 +41,7 @@ def fetch_crypto_keys(key_id=None):
def md5hex(s):
- return hashlib.md5(s).hexdigest()
+ return md5(s, usedforsecurity=False).hexdigest()
def encrypt(val, key=None, iv=None, ctxt=None):