[−][src]Struct neptune::poseidon::PoseidonConstants
Fields
mds_matrices: MDSMatrices<E>
round_constants: Vec<E::Fr>
compressed_round_constants: Vec<E::Fr>
pre_sparse_matrix: Vec<Vec<E::Fr>>
sparse_matrixes: Vec<SparseMatrix<E>>
strength: Strength
domain_tag: E::Fr
The domain tag is the first element of a Poseidon permutation. This extra element is necessary for 128-bit security.
full_rounds: usize
half_full_rounds: usize
partial_rounds: usize
hash_type: HashType<E::Fr, A>
Implementations
impl<'a, E, A> PoseidonConstants<E, A> where
E: ScalarEngine,
A: Arity<E::Fr>,
[src]
E: ScalarEngine,
A: Arity<E::Fr>,
pub fn new() -> Self
[src]
pub fn new_constant_length(length: usize) -> Self
[src]
new_constant_length
creates constants for hashing a constant-sized preimage which is <= the max
supported by the permutation width.
pub fn with_length(&self, length: usize) -> Self
[src]
pub fn new_with_strength(strength: Strength) -> Self
[src]
pub fn new_with_strength_and_type(
strength: Strength,
hash_type: HashType<E::Fr, A>
) -> Self
[src]
strength: Strength,
hash_type: HashType<E::Fr, A>
) -> Self
pub fn arity(&self) -> usize
[src]
Returns the width.
pub fn width(&self) -> usize
[src]
Returns the width.
Trait Implementations
impl<E: Clone, A: Clone> Clone for PoseidonConstants<E, A> where
E: ScalarEngine,
A: Arity<E::Fr>,
E::Fr: Clone,
E::Fr: Clone,
E::Fr: Clone,
E::Fr: Clone,
E::Fr: Clone,
[src]
E: ScalarEngine,
A: Arity<E::Fr>,
E::Fr: Clone,
E::Fr: Clone,
E::Fr: Clone,
E::Fr: Clone,
E::Fr: Clone,
pub fn clone(&self) -> PoseidonConstants<E, A>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<E: Debug, A: Debug> Debug for PoseidonConstants<E, A> where
E: ScalarEngine,
A: Arity<E::Fr>,
E::Fr: Debug,
E::Fr: Debug,
E::Fr: Debug,
E::Fr: Debug,
E::Fr: Debug,
[src]
E: ScalarEngine,
A: Arity<E::Fr>,
E::Fr: Debug,
E::Fr: Debug,
E::Fr: Debug,
E::Fr: Debug,
E::Fr: Debug,
impl<E: PartialEq, A: PartialEq> PartialEq<PoseidonConstants<E, A>> for PoseidonConstants<E, A> where
E: ScalarEngine,
A: Arity<E::Fr>,
E::Fr: PartialEq,
E::Fr: PartialEq,
E::Fr: PartialEq,
E::Fr: PartialEq,
E::Fr: PartialEq,
[src]
E: ScalarEngine,
A: Arity<E::Fr>,
E::Fr: PartialEq,
E::Fr: PartialEq,
E::Fr: PartialEq,
E::Fr: PartialEq,
E::Fr: PartialEq,
pub fn eq(&self, other: &PoseidonConstants<E, A>) -> bool
[src]
pub fn ne(&self, other: &PoseidonConstants<E, A>) -> bool
[src]
impl<E, A> StructuralPartialEq for PoseidonConstants<E, A> where
E: ScalarEngine,
A: Arity<E::Fr>,
[src]
E: ScalarEngine,
A: Arity<E::Fr>,
Auto Trait Implementations
impl<E, A> RefUnwindSafe for PoseidonConstants<E, A> where
A: RefUnwindSafe,
<E as ScalarEngine>::Fr: RefUnwindSafe,
[src]
A: RefUnwindSafe,
<E as ScalarEngine>::Fr: RefUnwindSafe,
impl<E, A> Send for PoseidonConstants<E, A> where
A: Send,
[src]
A: Send,
impl<E, A> Sync for PoseidonConstants<E, A> where
A: Sync,
[src]
A: Sync,
impl<E, A> Unpin for PoseidonConstants<E, A> where
A: Unpin,
<E as ScalarEngine>::Fr: Unpin,
[src]
A: Unpin,
<E as ScalarEngine>::Fr: Unpin,
impl<E, A> UnwindSafe for PoseidonConstants<E, A> where
A: UnwindSafe,
<E as ScalarEngine>::Fr: UnwindSafe,
[src]
A: UnwindSafe,
<E as ScalarEngine>::Fr: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub 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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,