summaryrefslogtreecommitdiff
path: root/django/utils/crypto.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-01-28 07:35:27 -0500
committerTim Graham <timograham@gmail.com>2015-02-06 08:16:28 -0500
commit0ed7d155635da9f79d4dd67e4889087d3673c6da (patch)
treecf5c59b563f01774f32e20b3af8cb24a387fdc4d /django/utils/crypto.py
parent388d986b8a6bb1363dab9f53ea435dff4dfe92cb (diff)
Sorted imports with isort; refs #23860.
Diffstat (limited to 'django/utils/crypto.py')
-rw-r--r--django/utils/crypto.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/django/utils/crypto.py b/django/utils/crypto.py
index a2a64052b7..b364762275 100644
--- a/django/utils/crypto.py
+++ b/django/utils/crypto.py
@@ -3,14 +3,19 @@ Django's standard crypto functions and utilities.
"""
from __future__ import unicode_literals
+import binascii
+import hashlib
import hmac
+import random
import struct
-import hashlib
-import binascii
import time
+from django.conf import settings
+from django.utils import six
+from django.utils.encoding import force_bytes
+from django.utils.six.moves import range
+
# Use the system PRNG if possible
-import random
try:
random = random.SystemRandom()
using_sysrandom = True
@@ -20,11 +25,6 @@ except NotImplementedError:
'on your system. Falling back to Mersenne Twister.')
using_sysrandom = False
-from django.conf import settings
-from django.utils.encoding import force_bytes
-from django.utils import six
-from django.utils.six.moves import range
-
def salted_hmac(key_salt, value, secret=None):
"""