Struct block_buffer::BlockBuffer [−][src]
pub struct BlockBuffer<BlockSize: ArrayLength<u8>> { /* fields omitted */ }
Buffer for block processing of data
Methods
impl<BlockSize: ArrayLength<u8>> BlockBuffer<BlockSize>
[src]
impl<BlockSize: ArrayLength<u8>> BlockBuffer<BlockSize>
pub fn input<F>(&mut self, input: &[u8], f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
[src]
pub fn input<F>(&mut self, input: &[u8], f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
Process data in input
in blocks of size BlockSize
using function f
.
pub fn input_lazy<F>(&mut self, input: &[u8], f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
[src]
pub fn input_lazy<F>(&mut self, input: &[u8], f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
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.
pub fn len64_padding_be<F>(&mut self, prefix: u8, data_len: u64, f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
[src]
pub fn len64_padding_be<F>(&mut self, prefix: u8, data_len: u64, f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
Pad message with provided prefix and 64 bit message length in big-endian format
pub fn len64_padding_le<F>(&mut self, prefix: u8, data_len: u64, f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
[src]
pub fn len64_padding_le<F>(&mut self, prefix: u8, data_len: u64, f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
Pad message with provided prefix and 64 bit message length in little-endian format
pub fn len128_padding_be<F>(&mut self, prefix: u8, hi: u64, lo: u64, f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
[src]
pub fn len128_padding_be<F>(&mut self, prefix: u8, hi: u64, lo: u64, f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
Pad message with provided prefix and 128 bit message length in big-endian format
pub fn len128_padding_le<F>(&mut self, prefix: u8, hi: u64, lo: u64, f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
[src]
pub fn len128_padding_le<F>(&mut self, prefix: u8, hi: u64, lo: u64, f: F) where
F: FnMut(&GenericArray<u8, BlockSize>),
Pad message with provided prefix and 128 bit message length in little-endian format
pub fn pad_with<P: Padding>(
&mut self
) -> Result<&mut GenericArray<u8, BlockSize>, PadError>
[src]
pub fn pad_with<P: Padding>(
&mut self
) -> Result<&mut GenericArray<u8, BlockSize>, PadError>
Pad message with given padding P
, returns PadError
if
internall buffer is full, which can only happen if input_lazy
was used.
pub fn size(&self) -> usize
[src]
pub fn size(&self) -> usize
Return size of the internall buffer in bytes
pub fn position(&self) -> usize
[src]
pub fn position(&self) -> usize
Return current cursor position
pub fn remaining(&self) -> usize
[src]
pub fn remaining(&self) -> usize
Return number of remaining bytes in the internall buffer
Trait Implementations
impl<BlockSize: Clone + ArrayLength<u8>> Clone for BlockBuffer<BlockSize>
[src]
impl<BlockSize: Clone + ArrayLength<u8>> Clone for BlockBuffer<BlockSize>
fn clone(&self) -> BlockBuffer<BlockSize>
[src]
fn clone(&self) -> BlockBuffer<BlockSize>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<BlockSize: Default + ArrayLength<u8>> Default for BlockBuffer<BlockSize>
[src]
impl<BlockSize: Default + ArrayLength<u8>> Default for BlockBuffer<BlockSize>
fn default() -> BlockBuffer<BlockSize>
[src]
fn default() -> BlockBuffer<BlockSize>
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl<BlockSize> Send for BlockBuffer<BlockSize>
impl<BlockSize> Send for BlockBuffer<BlockSize>
impl<BlockSize> Sync for BlockBuffer<BlockSize>
impl<BlockSize> Sync for BlockBuffer<BlockSize>