[issue33213] crypt function not hashing properly

Ron Reiter report at bugs.python.org
Tue Apr 3 04:26:58 EDT 2018


New submission from Ron Reiter <ron.reiter at gmail.com>:

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))
False

----------
components: Extension Modules
messages: 314866
nosy: Ron Reiter
priority: normal
severity: normal
status: open
title: crypt function not hashing properly
versions: Python 3.6

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


More information about the Python-bugs-list mailing list