[Python-checkins] r61581 - in python/trunk: Doc/library/hashlib.rst Lib/hashlib.py
gregory.p.smith
python-checkins at python.org
Wed Mar 19 02:38:35 CET 2008
Author: gregory.p.smith
Date: Wed Mar 19 02:38:35 2008
New Revision: 61581
Modified:
python/trunk/Doc/library/hashlib.rst
python/trunk/Lib/hashlib.py
Log:
Mention that crc32 and adler32 are available in a different module (zlib).
Some people look for them in hashlib.
Modified: python/trunk/Doc/library/hashlib.rst
==============================================================================
--- python/trunk/Doc/library/hashlib.rst (original)
+++ python/trunk/Doc/library/hashlib.rst Wed Mar 19 02:38:35 2008
@@ -21,6 +21,10 @@
digest are interchangeable. Older algorithms were called message digests. The
modern term is secure hash.
+.. note::
+ If you want the adler32 or crc32 hash functions they are available in
+ the :mod:`zlib` module.
+
.. warning::
Some algorithms have known hash collision weaknesses, see the FAQ at the end.
Modified: python/trunk/Lib/hashlib.py
==============================================================================
--- python/trunk/Lib/hashlib.py (original)
+++ python/trunk/Lib/hashlib.py Wed Mar 19 02:38:35 2008
@@ -18,6 +18,9 @@
More algorithms may be available on your platform but the above are
guaranteed to exist.
+NOTE: If you want the adler32 or crc32 hash functions they are available in
+the zlib module.
+
Choose your hash function wisely. Some have known collision weaknesses.
sha384 and sha512 will be slow on 32 bit platforms.
More information about the Python-checkins
mailing list