[−][src]Struct block_buffer::BlockBuffer
Buffer for block processing of data
Implementations
impl<BlockSize: ArrayLength<u8>> BlockBuffer<BlockSize>
[src]
pub fn input_block(
&mut self,
input: &[u8],
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
[src]
&mut self,
input: &[u8],
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
Process data in input
in blocks of size BlockSize
using function f
.
pub fn input_blocks(
&mut self,
input: &[u8],
f: impl FnMut(&[GenericArray<u8, BlockSize>])
)
[src]
&mut self,
input: &[u8],
f: impl FnMut(&[GenericArray<u8, BlockSize>])
)
Process data in input
in blocks of size BlockSize
using function f
, which accepts
slice of blocks.
pub fn input_lazy(
&mut self,
input: &[u8],
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
[src]
&mut self,
input: &[u8],
f: impl 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(
&mut self,
data_len: u64,
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
[src]
&mut self,
data_len: u64,
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
Pad message with 0x80, zeros and 64-bit message length using big-endian byte order
pub fn len64_padding_le(
&mut self,
data_len: u64,
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
[src]
&mut self,
data_len: u64,
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
Pad message with 0x80, zeros and 64-bit message length using little-endian byte order
pub fn len128_padding_be(
&mut self,
data_len: u128,
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
[src]
&mut self,
data_len: u128,
f: impl FnMut(&GenericArray<u8, BlockSize>)
)
Pad message with 0x80, zeros and 128-bit message length using big-endian byte order
pub fn size(&self) -> usize
[src]
Return size of the internall buffer in bytes
pub fn position(&self) -> usize
[src]
Return current cursor position
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
Trait Implementations
impl<BlockSize: Clone + ArrayLength<u8>> Clone for BlockBuffer<BlockSize>
[src]
fn clone(&self) -> BlockBuffer<BlockSize>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<BlockSize: Default + ArrayLength<u8>> Default for BlockBuffer<BlockSize>
[src]
fn default() -> BlockBuffer<BlockSize>
[src]
Auto Trait Implementations
impl<BlockSize> Send for BlockBuffer<BlockSize>
impl<BlockSize> Sync for BlockBuffer<BlockSize>
impl<BlockSize> Unpin for BlockBuffer<BlockSize> where
<BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
<BlockSize as ArrayLength<u8>>::ArrayType: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,