summaryrefslogtreecommitdiff
path: root/passlib/handlers/windows.py
diff options
context:
space:
mode:
Diffstat (limited to 'passlib/handlers/windows.py')
-rw-r--r--passlib/handlers/windows.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/passlib/handlers/windows.py b/passlib/handlers/windows.py
index e4a5199..9805037 100644
--- a/passlib/handlers/windows.py
+++ b/passlib/handlers/windows.py
@@ -156,11 +156,12 @@ class nthash(uh.StaticHandler):
return md4(secret.encode("utf-16-le")).digest()
@classmethod
- def raw_nthash(cls, secret):
+ def raw_nthash(cls, secret, hex=False):
warn("nthash.raw_nthash() is deprecated, and will be removed "
"in Passlib 1.8, please use nthash.raw() instead",
DeprecationWarning)
- return nthash_hex.raw(secret)
+ ret = nthash.raw(secret)
+ return hexlify(ret) if hex else ret
#=========================================================
# eoc