Unrecognized blowfish hash
Hi
It looks like custom_app_context.verify
does not recognize blowfish passwords generated with bcrypt
.
>>> from passlib.hash import bcrypt
>>> from passlib.apps import custom_app_context
>>> password = "foobar"
>>> custom_app_context.verify(password, bcrypt.hash(password))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/eloi/env/lib/python3.7/site-packages/passlib/context.py", line 2343, in verify
record = self._get_or_identify_record(hash, scheme, category)
File "/home/eloi/env/lib/python3.7/site-packages/passlib/context.py", line 2031, in _get_or_identify_record
return self._identify_record(hash, category)
File "/home/eloi/env/lib/python3.7/site-packages/passlib/context.py", line 1132, in identify_record
raise exc.UnknownHashError("hash could not be identified")
passlib.exc.UnknownHashError: hash could not be identified
hash could not be identified
Reading the README, I would have expected this piece of code to work. Am I missing something or is there a real bug here?
Éloi