sha-512

Implementation of SHA 1, 256, 384, and 512

As a continuation of the previous entry about the implementation of SHA-1, I've now implemented the last three algorithms as well. These are SHA-256, SHA-384, and SHA-512. SHA-1 provided a 160-bit digest, SHA-256 provides a 256-bit digest, SHA-384 provides a 384-bit digest, and, believe it or not, SHA-512 provides a 512-bit digest. These algorithms are described in FIPS 180-2.

The usage is the same as for SHA-1, except for a little detail of specifying the exact algorithm to use:

>>> import sha
Syndicate content