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

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top