On Wed, Apr 21, 2010 at 2:29 AM, luca72 <lucabe...@libero.it> wrote: > On 20 Apr, 19:38, Peter Otten <__pete...@web.de> wrote: >> luca72 wrote: >> > Hello i have to do this : >> > glibc crypt() function, using salt $1$abcdefgh$ >> >> > cryptPw = crypt(plainPw, "$1$abcdefgh$") > Thanks > The result is correct i obtain the same with ctypes and crypt module, > so i think that is better to use the crypt module is correct? > > Luca
Be aware that the beginning of the salt string determines the type of hash you're using, and it looks to me like that's the old-style MD5-based hash. It's far from 'broken', but it has a few issues. Better would be to move to the SHA512-based $6$ if your platform supports it. Geremy Condra -- http://mail.python.org/mailman/listinfo/python-list