[ 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.
This commit is contained in:
Gregory P. Smith 2005-08-21 18:45:59 +00:00
parent 33a5f2af59
commit f21a5f7739
21 changed files with 2589 additions and 53 deletions

10
Lib/md5.py Normal file
View file

@ -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