pub struct BlockBuffer<BlockSize: ArrayLength<u8>> { /* private fields */ }
Expand description

Buffer for block processing of data

Implementations

Process data in input in blocks of size BlockSize using function f.

Process data in input in blocks of size BlockSize using function f, which accepts slice of blocks.

Variant that doesn’t flush the buffer until there’s additional data to be processed. Suitable for tweakable block ciphers like Threefish that need to know whether a block is the last data block before processing it.

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

Pad message with a given padding P

Returns PadError if internall buffer is full, which can only happen if input_lazy was used.

Return size of the internall buffer in bytes

Return current cursor position

Return number of remaining bytes in the internall buffer

Reset buffer by setting cursor position to zero

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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 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.