| Linux server27.hostingraja.org 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64 Path : /usr/lib64/python2.6/site-packages/Crypto/Hash/ |
| Current File : //usr/lib64/python2.6/site-packages/Crypto/Hash/SHA.py |
# Just use the SHA module from the Python standard library
__revision__ = "$Id: SHA.py,v 1.4 2002/07/11 14:31:19 akuchling Exp $"
__all__ = ['new', 'digest_size']
try:
# The md5 module is deprecated in Python 2.6, so use hashlib when possible.
import hashlib
def new(data=""):
return hashlib.sha1(data)
digest_size = new().digest_size
except ImportError:
from sha import *
import sha
if hasattr(sha, 'digestsize'):
digest_size = digestsize
del digestsize
del sha