pub struct BlockBuffer<BlockSize, Kind> where
    BlockSize: ArrayLength<u8> + IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>,
    Kind: BufferKind,
    <BlockSize as IsLess<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>>::Output: NonZero
{ /* private fields */ }
Expand description

Buffer for block processing of data.

Implementations

Create new buffer from slice.

Panics

If slice length is not valid for used buffer kind.

Digest data in input in blocks of size BlockSize using the compress function, which accepts slice of blocks.

Reset buffer by setting cursor position to zero.

Pad remaining data with zeros and return resulting block.

Return current cursor position.

Return slice of data stored inside the buffer.

Set buffer content and cursor position.

Panics

If pos is bigger or equal to block size.

Return size of the internall buffer in bytes.

Return number of remaining bytes in the internall buffer.

Set data to generated blocks.

Compress remaining data after padding it with delim, zeros and the suffix bytes. If there is not enough unused space, compress will be called twice.

Panics

If suffix length is bigger than block size.

Pad message with 0x80, zeros and 64-bit message length using big-endian byte order.

Pad message with 0x80, zeros and 64-bit message length using little-endian byte order.

Pad message with 0x80, zeros and 128-bit message length using big-endian byte order.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.