On 08/06/2009 01:55 PM, Asinox wrote: > Hi guys, please i need to know why md5 return this: > > <md5 HASH object @ 028B4DA0> > > > the way that im using: > > def encriptar(): > toEncode = pickle.dumps(datetime.now) > encoded = md5.new(toEncode) > > return encoded >
Because encoded is an md5 hash *object*. You can add more strings to the hash with the update() method. Then, when you are finished adding things, you call the digest() or hexdigest() method to retrieve the value of the hash. It isn't just a one-time hashing function that returns the value of the single item you pass to it. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---