GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Friday, February 25, 2011

MD5 In Python

To use md5 service, import it firstly
>>> import md5
Then make new instance
>>> m = md5.new()
Then supply the resources
>>> m.update("From Barack Obama")
>>> m.update("To Barack Obama")
Then process it
>>> m.digest()

You want to more condese? Do like this one
>>> md5.new("From Barack Obama To Barack Obama").digest()

It's the same
>>> m.update("Me")
>>> m.update("You")
with
>>> m.update("MeYou")
Share/Bookmark

No comments:

Post a Comment