md5 consistent across platforms/Python versions?

G

Gary Robinson

Hi,

I know that hash functions are often platform-dependent for efficiency
reasons. From what I understand, this includes Python's hash(), which I have
read is not guaranteed to return the same result across platforms or even
across Python versions.

Can someone tell me whether an MD5 hash using Python's MD5 library IS
guaranteed to return the same results for the same input string, across
platforms and Python versions?

My limited understanding of how MD5 is normally used would seem to indicate
that this must be the case, but it would be helpful for me to have
confirmation, since my knowledge in this area is very limited.

--Gary

--
Putting http://wecanstopspam.org in your email helps it pass through
overzealous spam filters.

Gary Robinson
CEO
Transpose, LLC
(e-mail address removed)
207-942-3463
http://www.transpose.com
http://radio.weblogs.com/0101454
 
E

Erik Max Francis

Gary said:
I know that hash functions are often platform-dependent for efficiency
reasons. From what I understand, this includes Python's hash(), which
I have
read is not guaranteed to return the same result across platforms or
even
across Python versions.
Yes.

Can someone tell me whether an MD5 hash using Python's MD5 library IS
guaranteed to return the same results for the same input string,
across
platforms and Python versions?

Yes.

MD5 hashes and Python's internal hash function are unrelated.
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top