diff options
Diffstat (limited to 'django/utils/crypto.py')
| -rw-r--r-- | django/utils/crypto.py | 16 |
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): """ |
