Struct poly1305::Poly1305 [−][src]
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]
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
pub fn update_padded(&mut self, data: &[u8])
[src]
pub fn finalize_reset(&mut self) -> Output<Self>
[src]
pub fn verify(
self,
other: &GenericArray<u8, Self::BlockSize>
) -> Result<(), Error>
[src]
self,
other: &GenericArray<u8, Self::BlockSize>
) -> Result<(), Error>
Auto Trait Implementations
impl RefUnwindSafe for Poly1305
impl Send for Poly1305
impl Sync for Poly1305
impl Unpin for Poly1305
impl UnwindSafe for Poly1305
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,
pub 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
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,