mysql hash generator in python

Matías Hernández msdark at
Tue Dec 16 14:33:53 CET 2008

(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

I python i try this:
if __name__=="__main__":
	s = hashlib.sha1()
	s2 = hashlib.sha1()
	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???


More information about the Python-list mailing list