diff options
| author | Tim Graham <timograham@gmail.com> | 2015-02-09 13:19:34 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-09 14:24:06 -0500 |
| commit | a8b70d251d238b4e6cfc7bb4296da15494f8dff3 (patch) | |
| tree | 94ef5bc53e59131906aecfcf792eeac86242aa62 /django/utils/crypto.py | |
| parent | eb406aa686ff1809903366ef6896037af2f1f69b (diff) | |
[1.8.x] Sorted imports with isort; refs #23860.
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
Diffstat (limited to 'django/utils/crypto.py')
| -rw-r--r-- | django/utils/crypto.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/django/utils/crypto.py b/django/utils/crypto.py index a2a64052b7..1bd0b4d63c 100644 --- a/django/utils/crypto.py +++ b/django/utils/crypto.py @@ -3,14 +3,18 @@ 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 -# Use the system PRNG if possible -import random +from django.conf import settings +from django.utils import six +from django.utils.encoding import force_bytes +from django.utils.six.moves import range + try: random = random.SystemRandom() using_sysrandom = True @@ -20,11 +24,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): """ |
