Struct polyval::backend::autodetect::Polyval
source · pub struct Polyval {
inner: Inner,
token: InitToken,
}
Expand description
POLYVAL: GHASH-like universal hash over GF(2^128).
Fields§
§inner: Inner
§token: InitToken
Implementations§
Trait Implementations§
source§impl BlockSizeUser for Polyval
impl BlockSizeUser for Polyval
source§impl KeyInit for Polyval
impl KeyInit for Polyval
source§fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength>
Create new value from variable size key.
source§fn generate_key(
rng: impl CryptoRng + RngCore,
) -> GenericArray<u8, Self::KeySize>
fn generate_key( rng: impl CryptoRng + RngCore, ) -> GenericArray<u8, Self::KeySize>
Generate random key using the provided
CryptoRng
.source§impl KeySizeUser for Polyval
impl KeySizeUser for Polyval
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: &[GenericArray<u8, Self::BlockSize>])
fn update(&mut self, blocks: &[GenericArray<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) -> GenericArray<u8, Self::BlockSize>
fn finalize_reset(&mut self) -> GenericArray<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 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