summaryrefslogtreecommitdiff
path: root/django/db/backends/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/utils.py')
-rw-r--r--django/db/backends/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/backends/utils.py b/django/db/backends/utils.py
index c342cf79b5..eda7159a41 100644
--- a/django/db/backends/utils.py
+++ b/django/db/backends/utils.py
@@ -1,12 +1,12 @@
import datetime
import decimal
import functools
-import hashlib
import logging
import time
from contextlib import contextmanager
from django.db import NotSupportedError
+from django.utils.crypto import md5
logger = logging.getLogger('django.db.backends')
@@ -216,7 +216,7 @@ def names_digest(*args, length):
Generate a 32-bit digest of a set of arguments that can be used to shorten
identifying names.
"""
- h = hashlib.md5()
+ h = md5(usedforsecurity=False)
for arg in args:
h.update(arg.encode())
return h.hexdigest()[:length]