[][src]Struct iota_crypto::Curl

pub struct Curl { /* fields omitted */ }

The Curl struct is a Sponge that uses the Curl hashing algorithm.

 use iota_crypto::{Sponge, Curl};
 // Create an array of 243 1s
 let input = [1; 243];
 // Create an array of 243 0s
 let mut out = [0; 243];
 let mut curl = Curl::default();
 curl.absorb(&input);
 curl.squeeze(&mut out);

Methods

impl Curl[src]

pub fn new(mode: HashMode) -> Result<Curl, Error>[src]

Creates a new instance of Curl using the provided mode

pub fn state(&self) -> &[i8][src]

Provides a view into the internal state

pub fn state_mut(&mut self) -> &mut [i8][src]

Provides a mutable view into the internal state

pub fn number_of_rounds(&self) -> usize[src]

Trait Implementations

impl Sponge for Curl[src]

impl Copy for Curl[src]

impl Clone for Curl[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Curl[src]

impl Debug for Curl[src]

Auto Trait Implementations

impl Send for Curl

impl Sync for Curl

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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]