Skip to main content

CurlP

Struct CurlP 

Source
pub struct CurlP { /* private fields */ }
👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

Expand description

State of the ternary cryptographic function CurlP.

Implementations§

Source§

impl CurlP

Source

pub fn new(rounds: CurlPRounds) -> Self

👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

Create a new CurlP sponge with rounds of iterations.

Trait Implementations§

Source§

impl Sponge for CurlP

Source§

fn reset(&mut self)

👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

Reset the internal state by overwriting it with zeros.

Source§

fn absorb(&mut self, input: &Trits) -> Result<(), Self::Error>

👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

Absorb input into the sponge by copying HASH_LENGTH chunks of it into its internal state and transforming the state before moving on to the next chunk.

If input is not a multiple of HASH_LENGTH with the last chunk having n < HASH_LENGTH trits, the last chunk will be copied to the first n slots of the internal state. The remaining data in the internal state is then just the result of the last transformation before the data was copied, and will be reused for the next transformation.

Source§

fn squeeze_into(&mut self, buf: &mut Trits) -> Result<(), Self::Error>

👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

Squeeze the sponge by copying the state into the provided buf. This will fill the buffer in chunks of HASH_LENGTH at a time.

If the last chunk is smaller than HASH_LENGTH, then only the fraction that fits is written into it.

Source§

type Error = Infallible

👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

An error indicating that a failure has occured during a sponge operation.
Source§

fn squeeze(&mut self) -> Result<TritBuf, Self::Error>

👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

Convenience function using Sponge::squeeze_into to return an owned output.
Source§

fn digest_into( &mut self, input: &Trits, buf: &mut Trits, ) -> Result<(), Self::Error>

👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

Convenience function to absorb input, squeeze the sponge into buf, and reset the sponge.
Source§

fn digest(&mut self, input: &Trits) -> Result<TritBuf, Self::Error>

👎Deprecated:

bee-crypto will not be supported in future versions. You can use functions from iota-crypto instead.

Convenience function to absorb input, squeeze the sponge, reset the sponge and return an owned output.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.