pub struct Polyval { /* private fields */ }Expand description
POLYVAL: GHASH-like universal hash over GF(2^128), but optimized for little-endian architectures.
Implementations§
Trait Implementations§
Source§impl BlockSizeUser for Polyval
impl BlockSizeUser for Polyval
Source§impl KeySizeUser for Polyval
impl KeySizeUser for Polyval
Source§impl ParBlocksSizeUser for Polyval
impl ParBlocksSizeUser for Polyval
Source§impl UhfBackend for Polyval
impl UhfBackend for Polyval
Source§fn proc_block(&mut self, block: &Block)
fn proc_block(&mut self, block: &Block)
Process single block.
Source§fn proc_par_blocks(&mut self, blocks: &ParBlocks)
fn proc_par_blocks(&mut self, blocks: &ParBlocks)
Process several blocks in parallel.
Source§fn blocks_needed_to_align(&self) -> usize
fn blocks_needed_to_align(&self) -> usize
Returns the number of blocks that should be passed to
Self::proc_block before
Self::proc_par_blocks can be used efficiently. This is always less than
Self::ParBlocksSize.Source§impl UniversalHash for Polyval
impl UniversalHash for Polyval
Source§fn update_with_backend(
&mut self,
f: impl UhfClosure<BlockSize = Self::BlockSize>,
)
fn update_with_backend( &mut self, f: impl UhfClosure<BlockSize = Self::BlockSize>, )
Update hash function state using the provided rank-2 closure.
Source§fn update(&mut self, blocks: &[Array<u8, Self::BlockSize>])
fn update(&mut self, blocks: &[Array<u8, Self::BlockSize>])
Update hash function state with the provided block.
Source§fn update_padded(&mut self, data: &[u8])
fn update_padded(&mut self, data: &[u8])
Input data into the universal hash function. If the length of the
data is not a multiple of the block size, the remaining data is
padded with zeroes up to the
BlockSize. Read moreSource§fn finalize_reset(&mut self) -> Array<u8, Self::BlockSize>
fn finalize_reset(&mut self) -> Array<u8, Self::BlockSize>
Obtain the output of a
UniversalHash computation and reset it back
to its initial state.Auto Trait Implementations§
impl Freeze for Polyval
impl RefUnwindSafe for Polyval
impl Send for Polyval
impl Sync for Polyval
impl Unpin for Polyval
impl UnsafeUnpin for Polyval
impl UnwindSafe for Polyval
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more