Expand description
SHA-2 and the legacy SHA-1 digest algorithm.
If all the data is available in a single contiguous slice then the digest
function should be used. Otherwise, the digest can be calculated in
multiple steps using Context
.
Modulesยง
Structsยง
- A digest algorithm.
- Block
Context ๐ - A context for multi-step (Init-Update-Finish) digest calculations.
- A calculated digest value.
- Output ๐
Enumsยง
- AlgorithmID ๐
Constantsยง
- The maximum block length (
Algorithm::block_len()
) of all the algorithms in this module. - The maximum chaining length (
Algorithm::chaining_len()
) of all the algorithms in this module. - The maximum output length (
Algorithm::output_len()
) of all the algorithms in this module. - The length of the output of SHA-1, in bytes.
- The length of the output of SHA-256, in bytes.
- The length of the output of SHA-384, in bytes.
- The length of the output of SHA-512/256, in bytes.
- SHA512_
BLOC ๐K_ LEN The length of a block for SHA-512-based algorithms, in bytes. - SHA512_
LEN_ ๐LEN The length of the length field for SHA-512-based algorithms, in bytes. - The length of the output of SHA-512, in bytes.
Staticsยง
- SHA-1 as specified in FIPS 180-4. Deprecated.
- SHA-256 as specified in FIPS 180-4.
- SHA-384 as specified in FIPS 180-4.
- SHA-512 as specified in FIPS 180-4.
- SHA-512/256 as specified in FIPS 180-4.
Functionsยง
- Returns the digest of
data
using the given digest algorithm. - format_
output ๐ - sha256_
format_ ๐output - sha512_
format_ ๐output
Unionsยง
- State ๐