467,116 Members | 1,252 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,116 developers. It's quick & easy.

md5 consistent across platforms/Python versions?

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
gr*******@transpose.com
207-942-3463
http://www.transpose.com
http://radio.weblogs.com/0101454

Jul 18 '05 #1
  • viewed: 2317
Share:
1 Reply
Gary Robinson wrote:
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.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ Nine worlds I remember.
\__/ Icelandic Edda of Snorri Sturluson
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Ted | last post: by
17 posts views Thread by Jan Danielsson | last post: by
reply views Thread by Neil Benn | last post: by
1 post views Thread by Toxy | last post: by
19 posts views Thread by xkenneth | last post: by
reply views Thread by Terry Reedy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.