Struct block_buffer::LazyBlockBuffer [−][src]
pub struct LazyBlockBuffer<BlockSize: ArrayLength<u8>> { /* fields omitted */ }
Buffer for lazy block processing of data.
Implementations
impl<BlockSize: ArrayLength<u8>> LazyBlockBuffer<BlockSize>
[src]
impl<BlockSize: ArrayLength<u8>> LazyBlockBuffer<BlockSize>
[src]pub fn block_mode_processing<'a>(
&mut self,
data: &[u8],
buf: &'a mut [u8],
process: impl FnMut(&mut [Block<BlockSize>])
) -> Result<&'a [u8], InvalidLength>
[src]
&mut self,
data: &[u8],
buf: &'a mut [u8],
process: impl FnMut(&mut [Block<BlockSize>])
) -> Result<&'a [u8], InvalidLength>
Process data
in blocks and write result to out_buf
, storing
leftovers for future use.
pub fn pad_zeros(&mut self) -> &mut Block<BlockSize>
[src]
Pad remaining data with zeros and call compress
with resulting block.
pub fn get_full_block(&mut self) -> Option<&mut Block<BlockSize>>
[src]
Return block if buffer is full, otherwise returns None
.
pub fn size(&self) -> usize
[src]
Return size of the internall buffer in bytes.
pub fn remaining(&self) -> usize
[src]
Return number of remaining bytes in the internall buffer.
pub fn reset(&mut self)
[src]
Reset buffer by setting cursor position to zero.
pub fn get_pos(&self) -> usize
[src]
Return current cursor position.
pub fn set(&mut self, buf: Block<BlockSize>, pos: usize)
[src]
Trait Implementations
impl<BlockSize: Clone + ArrayLength<u8>> Clone for LazyBlockBuffer<BlockSize>
[src]
impl<BlockSize: Clone + ArrayLength<u8>> Clone for LazyBlockBuffer<BlockSize>
[src]fn clone(&self) -> LazyBlockBuffer<BlockSize>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<BlockSize: Default + ArrayLength<u8>> Default for LazyBlockBuffer<BlockSize>
[src]
impl<BlockSize: Default + ArrayLength<u8>> Default for LazyBlockBuffer<BlockSize>
[src]fn default() -> LazyBlockBuffer<BlockSize>
[src]
impl<B: ArrayLength<u8>> DigestBuffer<B> for LazyBlockBuffer<B>
[src]
impl<B: ArrayLength<u8>> DigestBuffer<B> for LazyBlockBuffer<B>
[src]Auto Trait Implementations
impl<BlockSize> Send for LazyBlockBuffer<BlockSize>
impl<BlockSize> Send for LazyBlockBuffer<BlockSize>
impl<BlockSize> Sync for LazyBlockBuffer<BlockSize>
impl<BlockSize> Sync for LazyBlockBuffer<BlockSize>
impl<BlockSize> Unpin for LazyBlockBuffer<BlockSize> where
<BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
impl<BlockSize> Unpin for LazyBlockBuffer<BlockSize> where
<BlockSize as ArrayLength<u8>>::ArrayType: Unpin,