Struct block_buffer::BlockBuffer [−][src]
pub struct BlockBuffer<BlockSize, Kind> where
BlockSize: ArrayLength<u8> + IsLess<U256>,
Le<BlockSize, U256>: NonZero,
Kind: BufferKind, { /* fields omitted */ }Expand description
Buffer for block processing of data.
Implementations
impl<BlockSize, Kind> BlockBuffer<BlockSize, Kind> where
BlockSize: ArrayLength<u8> + IsLess<U256>,
Le<BlockSize, U256>: NonZero,
Kind: BufferKind,
impl<BlockSize, Kind> BlockBuffer<BlockSize, Kind> where
BlockSize: ArrayLength<u8> + IsLess<U256>,
Le<BlockSize, U256>: NonZero,
Kind: BufferKind,
Digest data in input in blocks of size BlockSize using
the compress function, which accepts slice of blocks.
Pad remaining data with zeros and return resulting block.
impl<BlockSize> BlockBuffer<BlockSize, Eager> where
BlockSize: ArrayLength<u8> + IsLess<U256>,
Le<BlockSize, U256>: NonZero,
impl<BlockSize> BlockBuffer<BlockSize, Eager> where
BlockSize: ArrayLength<u8> + IsLess<U256>,
Le<BlockSize, U256>: NonZero,
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.