Skip to main content

RequestBodyHasher

Trait RequestBodyHasher 

Source
pub trait RequestBodyHasher {
    type Error;

    // Required methods
    fn digest_algorithm(&self) -> SigningDigestAlgorithm<'_>;
    fn hash_body(
        &self,
        body: &[u8],
        output: &mut [u8],
    ) -> Result<usize, Self::Error>;
}
Expand description

Caller-provided request-body hashing implementation.

Required Associated Types§

Source

type Error

Hashing failure.

Required Methods§

Source

fn digest_algorithm(&self) -> SigningDigestAlgorithm<'_>

Returns the exact digest algorithm implemented by this hasher.

Source

fn hash_body( &self, body: &[u8], output: &mut [u8], ) -> Result<usize, Self::Error>

Hashes the exact request body into caller-owned output.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§