python glibc crypt() function
__peter__ at web.de
Tue Apr 20 21:54:50 CEST 2010
geremy condra wrote:
> On Tue, Apr 20, 2010 at 1:38 PM, Peter Otten <__peter__ at web.de> wrote:
>> luca72 wrote:
>>> 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?
> Seems like my posts are dropping off of the net all of a sudden.
> In case this didn't go through the first time...
> Geremy Condra
This particular post did get get through, it is even marked as read over
Sorry for any confusion my pointless answer may have caused.
More information about the Python-list