[issue33213] crypt function not hashing properly on Mac (uses a specific salt)

2018-04-07 Thread Ron Reiter

Change by Ron Reiter <ron.rei...@gmail.com>:


--
type:  -> security

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33213] crypt function not hashing properly on Mac (uses a specific salt)

2018-04-03 Thread Ron Reiter

Change by Ron Reiter <ron.rei...@gmail.com>:


--
title: crypt function not hashing properly -> crypt function not hashing 
properly on Mac (uses a specific salt)

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33213] crypt function not hashing properly

2018-04-03 Thread Ron Reiter

Ron Reiter <ron.rei...@gmail.com> added the comment:

Also:
>>> crypt.crypt("test", "$5")
'$5yVOkTkyRzn.'
>>> crypt.crypt("test", "$6")
'$6asQOJRqB1i2'
>>> crypt.crypt("test", "$7")
'$7tSOkvDyiL6U'

So the salt is "$6"

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33213] crypt function not hashing properly

2018-04-03 Thread Ron Reiter

Ron Reiter <ron.rei...@gmail.com> added the comment:

Python 3.6.4 (default, Mar 22 2018, 23:35:12)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import crypt
>>> crypt.crypt("test", crypt.METHOD_SHA512)
'$6asQOJRqB1i2'
>>> crypt.crypt("test", crypt.METHOD_SHA512)
'$6asQOJRqB1i2'

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33213] crypt function not hashing properly

2018-04-03 Thread Ron Reiter

Ron Reiter <ron.rei...@gmail.com> added the comment:

Apparently it's a Mac issue. My crypt.methods only contains 
[] which is probably why this fails. It's a silent failure 
of some sort that is causing this.

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33213] crypt function not hashing properly

2018-04-03 Thread Ron Reiter

Ron Reiter <ron.rei...@gmail.com> added the comment:

You guessed it, the salt is "$6"

--

___
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33213] crypt function not hashing properly

2018-04-03 Thread Ron Reiter

Ron Reiter <ron.rei...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue33213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33213] crypt function not hashing properly

2018-04-03 Thread Ron Reiter

New submission from Ron Reiter <ron.rei...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue33213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com