Trait Finalize

Source
pub trait Finalize {
    type Digest: Digest;
    type Update: Update;

    // Required methods
    fn digest(&self) -> Self::Digest;
    fn reset(&self) -> Self::Update;
}
Expand description

A trait for hash objects in a finalized state.

This trait defines the common interface for hash objects that have been finalized, producing the final digest. Implementations of this trait typically provide methods for obtaining the final digest and resetting the state to perform additional hashing.

Required Associated Types§

Source

type Digest: Digest

The type representing the digest produced by finalizing the hash.

Source

type Update: Update

The type representing the in-progress state, which can be finalized again.

Required Methods§

Source

fn digest(&self) -> Self::Digest

Produces the final digest.

Source

fn reset(&self) -> Self::Update

Resets the finalized state to the in-progress state.

Implementors§