[][src]Struct secretbox::poly1305::Poly1305

pub struct Poly1305 { /* fields omitted */ }

Poly1305 structure

Methods

impl Poly1305[src]

pub fn new(r: u128, s: u128) -> Poly1305[src]

pub fn read_block(&mut self, x: &[u8])[src]

Reads one block. Panics if the size is larger than 16

pub fn finalize(&self) -> u128[src]

Returns the finalized hash. This struct can still be used to extend the message if necessary (which it shouldn't be)

pub fn hash(&mut self, data: &[u8]) -> u128[src]

Hashes a message, one block at a time, then finalizes the output

pub fn verify(&mut self, data: &[u8], expected: u128) -> bool[src]

Verifies a message based on a certain hash

Auto Trait Implementations

Blanket Implementations

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

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> 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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,