[issue33213] crypt function not hashing properly

Ron Reiter report at bugs.python.org
Tue Apr 3 04:28:10 EDT 2018


Ron Reiter <ron.reiter at gmail.com> added the comment:

import crypt

Expected result:
>>> crypt.crypt("test") == crypt.crypt("test")
False
>>> crypt.crypt("test", crypt.mksalt()) == crypt.crypt("test", crypt.mksalt())
False

Unexpected results:
>>> crypt.crypt("test", crypt.METHOD_SHA512) == crypt.crypt("test", crypt.METHOD_SHA512)
True
>>> crypt.crypt("test", crypt.mksalt(crypt.METHOD_SHA512)) == crypt.crypt("test", crypt.mksalt(crypt.METHOD_SHA512))
True

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33213>
_______________________________________


More information about the Python-bugs-list mailing list