python setup.py build [options]
Valid options: --openssl-prefix=path, --openssl-incdir=path, --openssl-libdir=path
If OpenSSL 0.9.7 or later is found it will be used. Version 0.9.8 is preferred as it provides many more optimized algorithms. OpenSSL is not required.
python setup.py install
Use the following hash object constructors:
md5, sha1, sha224, sha256, sha384, and sha512
Hash objects have update, copy, digest, and hexdigest methods.
>>> x = hashlib.sha224('spam') >>> x.hexdigest() 'e047c44d875407fdb49d53d8b2326fc3e20e27f08434fef1275a3981' >>> y = x.copy() >>> y.update(' and eggs') >>> y.hexdigest() '1c54f569f9b5c7cec6a34465de51df10b0048f3d48f7051ac6eb2e54'
Real documentation for this module can be found on python.org:
Gregory P. Smith .. greg at krypto dot org
The following also applies to binary packages of this module if they are linked with OpenSSL:
"This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
20081119: * Synced to svn.python.org r66496: * Fix possible integer overflows in _hashopenssl #3886 - benjamin.peterson * Make use of METH_O and METH_NOARGS where possible. - georg.brandl * Use Py_UnpackTuple instead of PyArg_ParseTuple. - georg.brandl * Improved the docstrings. - gregory.p.smith 20060408a: * Initial stand alone release.