We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The sha module

This module provides an alternative way to calculate message signatures. It’s similar to the md5 module, but generates 160-bit signatures instead.

Example: Using the sha module
# File: sha-example-1.py

import sha

hash = sha.new()
hash.update("spam, spam, and eggs")

print repr(hash.digest())
print hash.hexdigest()


See the md5 examples for more ways to use message signatures.