python glibc crypt() function

geremy condra debatem1 at
Tue Apr 20 21:16:35 EDT 2010

2010/4/20 Дамјан Георгиевски <gdamjan at>:
>>> 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?
>>> Thanks
>>>>> import ctypes
>>>>> lib = ctypes.CDLL("")
>>>>> crypt = lib.crypt
>>>>> crypt.restype = ctypes.c_char_p
>>>>> crypt("password", "$1$abcdefgh$")
>> '$1$abcdefgh$G//4keteveJp0qb8z2DxG/'
>> Is that what it's supposed to return?
> seeing this I thought about using ctypes for AES (or similar) crypto
> function. A bit of google searching I've come to
> just FYI

ctypescrypto does not appear to be maintained, but I've started
a similar project called evpy ( that also
provides envelope encryption. Comments are welcome- we're
probably going to be doing our first release sometime towards
the middle of next month.

Geremy Condra

More information about the Python-list mailing list