python glibc crypt() function
__peter__ at web.de
Tue Apr 20 13:38:25 EDT 2010
> Hello i have to do this :
> glibc crypt() function, using salt $1$abcdefgh$
> cryptPw = crypt(plainPw, "$1$abcdefgh$")
> I can do it in python, with package i need?
>>> import ctypes
>>> lib = ctypes.CDLL("libcrypt.so.1")
>>> crypt = lib.crypt
>>> crypt.restype = ctypes.c_char_p
>>> crypt("password", "$1$abcdefgh$")
Is that what it's supposed to return?
More information about the Python-list