[−][src]Struct poly1305::Poly1305
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
impl Poly1305
[src]
pub fn compute_unpadded(self, data: &[u8]) -> Tag
[src]
Compute unpadded Poly1305 for the given input data.
The main use case for this is XSalsa20Poly1305.
Trait Implementations
impl Clone for Poly1305
[src]
fn clone(&self) -> Poly1305
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl NewUniversalHash for Poly1305
[src]
type KeySize = U32
Size of the key for the universal hash function.
fn new(key: &Key) -> Poly1305
[src]
Initialize Poly1305 with the given key
impl UniversalHash for Poly1305
[src]
type BlockSize = U16
Size of the inputs to and outputs from the universal hash function
fn update(&mut self, block: &Block)
[src]
Input data into the Poly1305 universal hash function
fn reset(&mut self)
[src]
Reset internal state
fn finalize(self) -> Tag
[src]
Get the hashed output
fn update_padded(&mut self, data: &[u8])
[src]
fn finalize_reset(&mut self) -> Output<Self>
[src]
fn verify(self, other: &GenericArray<u8, Self::BlockSize>) -> Result<(), Error>
[src]
Auto Trait Implementations
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>,