We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f8b9ac commit af459e6Copy full SHA for af459e6
simplebcrypt.py
@@ -12,6 +12,12 @@ def bhash(password):
12
except:
13
return None
14
def verify(password,hashed):
15
+ if type(password) == bytes:
16
+ password = password.decode()
17
+ if type(hashed) == bytes:
18
+ hashed = hashed.decode()
19
+ if type(password) != str or type(hashed) != str:
20
+ raise Exception("Wrong password type: Expected string")
21
if len(password) > 72:
22
raise Exception("Password is above max length of 72")
23
try:
0 commit comments