[−][src]Struct secretbox::poly1305::Poly1305
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
impl Send for Poly1305
impl Unpin for Poly1305
impl Sync for Poly1305
impl UnwindSafe for Poly1305
impl RefUnwindSafe for Poly1305
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,