pub struct Poly1305 { /* private fields */ }
Expand description
The Poly1305 universal hash function.
Note that Poly1305 is not a traditional MAC and is single-use only (a.k.a. “one-time authenticator”).
For this reason it doesn’t impl the crypto_mac::Mac
trait.
Implementations§
Trait Implementations§
source§impl BlockSizeUser for Poly1305
impl BlockSizeUser for Poly1305
source§impl KeyInit for Poly1305
impl KeyInit for Poly1305
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 Poly1305
impl KeySizeUser for Poly1305
source§impl UniversalHash for Poly1305
impl UniversalHash for Poly1305
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 moreAuto Trait Implementations§
impl Freeze for Poly1305
impl RefUnwindSafe for Poly1305
impl Send for Poly1305
impl Sync for Poly1305
impl Unpin for Poly1305
impl UnwindSafe for Poly1305
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)