projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Drop support for Python 2.x
[mudpy.git]
/
lib
/
mudpy
/
password.py
diff --git
a/lib/mudpy/password.py
b/lib/mudpy/password.py
index
b6b4be5
..
f6c1abc
100644
(file)
--- a/
lib/mudpy/password.py
+++ b/
lib/mudpy/password.py
@@
-1,7
+1,7
@@
# -*- coding: utf-8 -*-
"""Password hashing functions and constants for the mudpy engine."""
# -*- coding: utf-8 -*-
"""Password hashing functions and constants for the mudpy engine."""
-# Copyright (c) 2004-201
3
Jeremy Stanley <fungi@yuggoth.org>. Permission
+# Copyright (c) 2004-201
4
Jeremy Stanley <fungi@yuggoth.org>. Permission
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
# to use, copy, modify, and distribute this software is granted under
# terms provided in the LICENSE file distributed with this software.
@@
-163,11
+163,7
@@
def create(
# number of times
for i in range(2 ** rounds):
hashed = algorithms[algorithm](hashed.encode("utf-8")).digest()
# number of times
for i in range(2 ** rounds):
hashed = algorithms[algorithm](hashed.encode("utf-8")).digest()
- # TODO: remove this check after the switch to py3k
- try:
- hashed = "".join(format(x, "02x") for x in bytes(hashed))
- except ValueError:
- hashed = "".join(format(ord(x), "02x") for x in bytes(hashed))
+ hashed = "".join(format(x, "02x") for x in bytes(hashed))
# concatenate the output fields, coercing into text form as needed
return "%s%s%s%s%s%s%s%s" % (
# concatenate the output fields, coercing into text form as needed
return "%s%s%s%s%s%s%s%s" % (