annotate Lib/sha.py @ 58925:eecf1bef052d 2.6

Merged revisions 78207 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78207 | ezio.melotti | 2010-02-17 01:26:09 +0200 (Wed, 17 Feb 2010) | 1 line #7930: fix stripid ........
author Ezio Melotti <ezio.melotti@gmail.com>
date Tue, 16 Feb 2010 23:29:44 +0000
parents a11b4885b445
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35375
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
1 # $Id$
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
2 #
43298
a11b4885b445 email address update
Gregory P. Smith <greg@mad-scientist.com>
parents: 41924
diff changeset
3 # Copyright (C) 2005 Gregory P. Smith (greg@krypto.org)
35375
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
4 # Licensed to PSF under a Contributor Agreement.
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
5
41924
b380c9c49738 Have the sha module raise a DeprecationWarning as specified in PEP 4.
Brett Cannon <bcannon@gmail.com>
parents: 35375
diff changeset
6 import warnings
b380c9c49738 Have the sha module raise a DeprecationWarning as specified in PEP 4.
Brett Cannon <bcannon@gmail.com>
parents: 35375
diff changeset
7 warnings.warn("the sha module is deprecated; use the hashlib module instead",
b380c9c49738 Have the sha module raise a DeprecationWarning as specified in PEP 4.
Brett Cannon <bcannon@gmail.com>
parents: 35375
diff changeset
8 DeprecationWarning, 2)
b380c9c49738 Have the sha module raise a DeprecationWarning as specified in PEP 4.
Brett Cannon <bcannon@gmail.com>
parents: 35375
diff changeset
9
35375
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
10 from hashlib import sha1 as sha
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
11 new = sha
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
12
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
13 blocksize = 1 # legacy value (wrong in any useful sense)
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
14 digest_size = 20
624918e1c1b2 [ sf.net patch # 1121611 ]
Gregory P. Smith <greg@mad-scientist.com>
parents:
diff changeset
15 digestsize = 20