summaryrefslogtreecommitdiffstats
path: root/Lib/md5.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2005-08-21 18:45:59 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2005-08-21 18:45:59 (GMT)
commitf21a5f773964d34c7b6deb7e3d753fae2b9c70e2 (patch)
treeba3b66cea11da1d8e930555aa5a10f775a285d84 /Lib/md5.py
parent33a5f2af59ddcf3f1b0447a8dbd0576fd78de303 (diff)
downloadcpython-f21a5f773964d34c7b6deb7e3d753fae2b9c70e2.zip
cpython-f21a5f773964d34c7b6deb7e3d753fae2b9c70e2.tar.gz
cpython-f21a5f773964d34c7b6deb7e3d753fae2b9c70e2.tar.bz2
[ sf.net patch # 1121611 ]
A new hashlib module to replace the md5 and sha modules. It adds support for additional secure hashes such as SHA-256 and SHA-512. The hashlib module uses OpenSSL for fast platform optimized implementations of algorithms when available. The old md5 and sha modules still exist as wrappers around hashlib to preserve backwards compatibility.
Diffstat (limited to 'Lib/md5.py')
-rw-r--r--Lib/md5.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/md5.py b/Lib/md5.py
new file mode 100644
index 0000000..bbe1984
--- /dev/null
+++ b/Lib/md5.py
@@ -0,0 +1,10 @@
+# $Id$
+#
+# Copyright (C) 2005 Gregory P. Smith (greg@electricrain.com)
+# Licensed to PSF under a Contributor Agreement.
+
+from hashlib import md5
+new = md5
+
+blocksize = 1 # legacy value (wrong in any useful sense)
+digest_size = 16