python glibc crypt() function

L

luca72

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
 
P

Peter Otten

luca72 said:
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
'$1$abcdefgh$G//4keteveJp0qb8z2DxG/'

Is that what it's supposed to return?

Peter
 
Ð

Дамјан ГеоргиевÑки

Hello i have to do this :
'$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
http://code.google.com/p/ctypescrypto/

just FYI


--
дамјан ((( http://damjan.softver.org.mk/ )))

.... knowledge is exactly like power - something
to be distributed as widely as humanly possible,
for the betterment of all. -- jd
 
G

geremy condra

2010/4/20 Дамјан ГеоргиевÑки said:
seeing this I thought about using ctypes for AES (or similar) crypto
function. A bit of google searching I've come to
http://code.google.com/p/ctypescrypto/

just FYI

ctypescrypto does not appear to be maintained, but I've started
a similar project called evpy (http://gitorious.org/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
 
L

luca72

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
 
P

Peter Otten

luca72 said:
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?

Yes, use the crypt module.
 
G

geremy condra

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top