Trait FixedOutput

pub trait FixedOutput:
    Sized
    + Update
    + OutputSizeUser {
    // Required method
    fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>);

    // Provided method
    fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize> { ... }
}
Expand description

Trait for hash functions with fixed-size output.

Required Methods§

fn finalize_into(self, out: &mut GenericArray<u8, Self::OutputSize>)

Consume value and write result into provided array.

Provided Methods§

fn finalize_fixed(self) -> GenericArray<u8, Self::OutputSize>

Retrieve result and consume the hasher instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<D> FixedOutput for SimpleHmac<D>
where D: Digest + BlockSizeUser,

Source§

fn finalize_into( self, out: &mut GenericArray<u8, <SimpleHmac<D> as OutputSizeUser>::OutputSize>, )

§

impl<OutSize> FixedOutput for Blake2bMac<OutSize>
where OutSize: ArrayLength<u8> + IsLessOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>> + 'static, <OutSize as IsLessOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,

§

fn finalize_into( self, out: &mut GenericArray<u8, <Blake2bMac<OutSize> as OutputSizeUser>::OutputSize>, )

§

impl<OutSize> FixedOutput for Blake2sMac<OutSize>
where OutSize: ArrayLength<u8> + IsLessOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>> + 'static, <OutSize as IsLessOrEqual<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,

§

fn finalize_into( self, out: &mut GenericArray<u8, <Blake2sMac<OutSize> as OutputSizeUser>::OutputSize>, )

Implementors§

§

impl<T> FixedOutput for CoreWrapper<T>
where T: FixedOutputCore, <T as BlockSizeUser>::BlockSize: IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>, <<T as BlockSizeUser>::BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero,