[][src]Struct troika::ftroika::Ftroika

pub struct Ftroika { /* fields omitted */ }

The Ftroika struct is a Sponge that uses the Troika hashing algorithm.

use troika::Ftroika;
// Create an array of 243 1s
let input = [1; 243];
// Create an array of 243 0s
let mut out = [0; 243];
let mut ftroika = Ftroika::default();
ftroika.absorb(&input);
ftroika.finalize();
ftroika.squeeze(&mut out);

Methods

impl Ftroika[src]

pub fn new(num_rounds: usize) -> Result<Ftroika>[src]

pub fn reset(&mut self)[src]

pub fn absorb(&mut self, trits: &[u8])[src]

pub fn finalize(&mut self)[src]

pub fn squeeze(&mut self, trits: &mut [u8])[src]

Trait Implementations

impl Clone for Ftroika[src]

impl Copy for Ftroika[src]

impl Default for Ftroika[src]

impl Debug for Ftroika[src]

Auto Trait Implementations

impl Send for Ftroika

impl Sync for Ftroika

impl Unpin for Ftroika

impl UnwindSafe for Ftroika

impl RefUnwindSafe for Ftroika

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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> 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]