logo
Expand description

This crate provides traits which describe functionality of cryptographic hash functions.

Traits in this repository are organized into high-level convenience traits, mid-level traits which expose more fine-grained functionality, and low-level traits intended to only be used by algorithm implementations:

Additionally hash functions implement traits from the standard library: Default, Clone, Write. The latter is feature-gated behind std feature, which is usually enabled by default by hash implementation crates.

The Digest trait is the most commonly used trait.

Re-exports

pub use generic_array;

Modules

Type aliases for many constants.

Macros

Implements std::io::Write trait for implementer of Update

Structs

The error type for variable hasher initialization

Traits

Trait to indicate that digest function processes data in blocks of size BlockSize.

The Digest trait specifies an interface common for digest functions.

The DynDigest trait is a modification of Digest trait suitable for trait objects.

Trait which describes extendable-output functions (XOF).

Trait for extendable-output function (XOF) implementations to use to retrieve the hash output.

Trait for returning digest result with the fixed size

Trait for fixed-output digest implementations to use to retrieve the hash output.

Trait for resetting hash instances

Trait for updating digest state with input data.

Trait for returning digest result with the variable size

Trait for variable-sized output digest implementations to use to retrieve the hash output.

Trait for describing readers which are used to extract extendable output from XOF (extendable-output function) result.

Type Definitions

Output of a Digest function