From 69719b932ea2cf0e01b22bcbbeefe17e82d4e7d6 Mon Sep 17 00:00:00 2001 From: Emmanuel Cazenave Date: Tue, 17 Jul 2018 16:57:35 +0200 Subject: [PATCH] use stdlib OrderedDict (#25319) --- src/authentic2/hashers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/authentic2/hashers.py b/src/authentic2/hashers.py index c626d96b..579354c2 100644 --- a/src/authentic2/hashers.py +++ b/src/authentic2/hashers.py @@ -1,10 +1,10 @@ import hashlib import math import base64 +from collections import OrderedDict from django.contrib.auth import hashers from django.utils.crypto import constant_time_compare -from django.utils.datastructures import SortedDict from django.utils.translation import ugettext_noop as _ from django.utils.encoding import force_bytes from django.contrib.auth.hashers import make_password @@ -78,7 +78,7 @@ class Drupal7PasswordHasher(hashers.BasePasswordHasher): def safe_summary(self, encoded): algorithm, iterations, salt, hash = encoded.split('$', 3) assert algorithm == self.algorithm - return SortedDict([ + return OrderedDict([ (_('algorithm'), algorithm), (_('iterations'), iterations), (_('salt'), hashers.mask_hash(salt)), @@ -108,7 +108,7 @@ class CommonPasswordHasher(hashers.BasePasswordHasher): def safe_summary(self, encoded): algorithm, salt, hash = encoded.split('$', 2) assert algorithm == self.algorithm - return SortedDict([ + return OrderedDict([ (_('algorithm'), algorithm), (_('salt'), hashers.mask_hash(salt, show=2)), (_('hash'), hashers.mask_hash(hash)), -- 2.18.0