python mysql hash generator

M

Matías Hernández

sorry for my english, but i'm speak spanish)
Hi list.. this is my first post... and obviously if for help..

I try to implement the password function of mysql in a python script.

I read that the password function of mysql was implemented with a double
sha1()

I python i try this:
example1:
if __name__=="__main__":
s = hashlib.sha1()
s.update('test')
s2 = hashlib.sha1()
s2.update(s.digest()
print s2.hexdigest()

This script show me the same hash that password function of mysql, but
when i implement this in a class the hash is different??? why???

And if is posible??? can you show a example code of old_password
function of mysql in python???

THNX
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top