[][src]Struct poly1305::Poly1305

pub struct Poly1305 { /* fields omitted */ }

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.

Methods

impl Poly1305[src]

pub fn update(&mut self, data: &[u8])[src]

Input data into the Poly1305 universal hash function

pub fn chain(self, data: &[u8]) -> Self[src]

Process input messages in a chained manner

Trait Implementations

impl Clone for Poly1305[src]

impl UniversalHash for Poly1305[src]

type KeySize = U32

Size of the key for the universal hash function

type BlockSize = U16

Size of the inputs to and outputs from the universal hash function

fn new(key: &GenericArray<u8, U32>) -> Poly1305[src]

Initialize Poly1305 with the given key

fn update_block(&mut self, block: &GenericArray<u8, U16>)[src]

Input data into the Poly1305 universal hash function

fn reset(&mut self)[src]

Reset internal state

fn result(self) -> Tag[src]

Get the hashed output

Auto Trait Implementations

impl Unpin for Poly1305

impl Send for Poly1305

impl Sync for Poly1305

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self