1010you may suffer from the length extension attack.</ p >
1111</ div > </ details > < h2 id ="required-methods " class ="section-header "> Required Methods< a href ="#required-methods " class ="anchor "> §</ a > </ h2 > < div class ="methods "> < details class ="toggle method-toggle " open > < summary > < section id ="tymethod.digest " class ="method "> < a class ="src rightside " href ="../src/jf_merkle_tree/lib.rs.html#129 "> Source</ a > < h4 class ="code-header "> fn < a href ="#tymethod.digest " class ="fn "> digest</ a > (data: &< a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.slice.html "> [T]</ a > ) -> < a class ="enum " href ="https://doc.rust-lang.org/1.89.0/core/result/enum.Result.html " title ="enum core::result::Result "> Result</ a > <T, < a class ="enum " href ="errors/enum.MerkleTreeError.html " title ="enum jf_merkle_tree::errors::MerkleTreeError "> MerkleTreeError</ a > ></ h4 > </ section > </ summary > < div class ="docblock "> < p > Digest a list of values</ p >
1212</ div > </ details > < details class ="toggle method-toggle " open > < summary > < section id ="tymethod.digest_leaf " class ="method "> < a class ="src rightside " href ="../src/jf_merkle_tree/lib.rs.html#132 "> Source</ a > < h4 class ="code-header "> fn < a href ="#tymethod.digest_leaf " class ="fn "> digest_leaf</ a > (pos: < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html "> &I</ a > , elem: < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html "> &E</ a > ) -> < a class ="enum " href ="https://doc.rust-lang.org/1.89.0/core/result/enum.Result.html " title ="enum core::result::Result "> Result</ a > <T, < a class ="enum " href ="errors/enum.MerkleTreeError.html " title ="enum jf_merkle_tree::errors::MerkleTreeError "> MerkleTreeError</ a > ></ h4 > </ section > </ summary > < div class ="docblock "> < p > Digest an indexed element</ p >
13- </ div > </ details > </ div > < h2 id ="dyn-compatibility " class ="section-header "> Dyn Compatibility< a href ="#dyn-compatibility " class ="anchor "> §</ a > </ h2 > < div class ="dyn-compatibility-info "> < p > This trait is < b > not</ b > < a href ="https://doc.rust-lang.org/1.89.0/reference/items/traits.html#dyn-compatibility "> dyn compatible</ a > .</ p > < p > < i > In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</ i > </ p > </ div > < h2 id ="foreign-impls " class ="section-header "> Implementations on Foreign Types< a href ="#foreign-impls " class ="anchor "> §</ a > </ h2 > < details class ="toggle implementors-toggle "> < summary > < section id ="impl-DigestAlgorithm%3CF,+I,+F%3E-for-FixedLenPoseidon2Hash%3CF,+S,+INPUT_SIZE,+1%3E " class ="impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#81-107 "> Source</ a > < a href ="#impl-DigestAlgorithm%3CF,+I,+F%3E-for-FixedLenPoseidon2Hash%3CF,+S,+INPUT_SIZE,+1%3E " class ="anchor "> §</ a > < h3 class ="code-header "> impl<I, F, S, const INPUT_SIZE: < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.usize.html "> usize</ a > > < a class ="trait " href ="trait.DigestAlgorithm.html " title ="trait jf_merkle_tree::DigestAlgorithm "> DigestAlgorithm</ a > <F, I, F> for FixedLenPoseidon2Hash<F, S, INPUT_SIZE, 1>< div class ="where "> where
13+ </ div > </ details > </ div > < h2 id ="dyn-compatibility " class ="section-header "> Dyn Compatibility< a href ="#dyn-compatibility " class ="anchor "> §</ a > </ h2 > < div class ="dyn-compatibility-info "> < p > This trait is < b > not</ b > < a href ="https://doc.rust-lang.org/1.89.0/reference/items/traits.html#dyn-compatibility "> dyn compatible</ a > .</ p > < p > < i > In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</ i > </ p > </ div > < h2 id ="foreign-impls " class ="section-header "> Implementations on Foreign Types< a href ="#foreign-impls " class ="anchor "> §</ a > </ h2 > < details class ="toggle implementors-toggle "> < summary > < section id ="impl-DigestAlgorithm%3CF,+I,+F%3E-for-FixedLenPoseidon2Hash%3CF,+S,+INPUT_SIZE,+1%3E " class ="impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#81-107 "> Source</ a > < a href ="#impl-DigestAlgorithm%3CF,+I,+F%3E-for-FixedLenPoseidon2Hash%3CF,+S,+INPUT_SIZE,+1%3E " class ="anchor "> §</ a > < h3 class ="code-header "> impl<I, F, S, const INPUT_SIZE: < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.usize.html "> usize</ a > > < a class ="trait " href ="trait.DigestAlgorithm.html " title ="trait jf_merkle_tree::DigestAlgorithm "> DigestAlgorithm</ a > <F, I, F> for < a class ="struct " href ="../jf_poseidon2/crhf/struct.FixedLenPoseidon2Hash.html " title ="struct jf_poseidon2::crhf::FixedLenPoseidon2Hash "> FixedLenPoseidon2Hash</ a > <F, S, INPUT_SIZE, 1>< div class ="where "> where
1414 I: < a class ="trait " href ="trait.Index.html " title ="trait jf_merkle_tree::Index "> Index</ a > ,
1515 F: PrimeField + < a class ="trait " href ="https://doc.rust-lang.org/1.89.0/core/convert/trait.From.html " title ="trait core::convert::From "> From</ a > <I> + Unit,
16- S: Permutation<U = F> + Poseidon2Sponge,</ div > </ h3 > </ section > </ summary > < div class ="impl-items "> < section id ="method.digest " class ="method trait-impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#88-92 "> Source</ a > < a href ="#method.digest " class ="anchor "> §</ a > < h4 class ="code-header "> fn < a href ="#tymethod.digest " class ="fn "> digest</ a > (data: &< a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.slice.html "> [F]</ a > ) -> < a class ="enum " href ="https://doc.rust-lang.org/1.89.0/core/result/enum.Result.html " title ="enum core::result::Result "> Result</ a > <F, < a class ="enum " href ="errors/enum.MerkleTreeError.html " title ="enum jf_merkle_tree::errors::MerkleTreeError "> MerkleTreeError</ a > ></ h4 > </ section > < section id ="method.digest_leaf " class ="method trait-impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#94-106 "> Source</ a > < a href ="#method.digest_leaf " class ="anchor "> §</ a > < h4 class ="code-header "> fn < a href ="#tymethod.digest_leaf " class ="fn "> digest_leaf</ a > (pos: < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html "> &I</ a > , elem: < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html "> &F</ a > ) -> < a class ="enum " href ="https://doc.rust-lang.org/1.89.0/core/result/enum.Result.html " title ="enum core::result::Result "> Result</ a > <F, < a class ="enum " href ="errors/enum.MerkleTreeError.html " title ="enum jf_merkle_tree::errors::MerkleTreeError "> MerkleTreeError</ a > ></ h4 > </ section > </ div > </ details > < h2 id ="implementors " class ="section-header "> Implementors< a href ="#implementors " class ="anchor "> §</ a > </ h2 > < div id ="implementors-list "> < section id ="impl-DigestAlgorithm%3CE,+I,+HasherNode%3CH%3E%3E-for-HasherDigestAlgorithm " class ="impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/hasher.rs.html#144-168 "> Source</ a > < a href ="#impl-DigestAlgorithm%3CE,+I,+HasherNode%3CH%3E%3E-for-HasherDigestAlgorithm " class ="anchor "> §</ a > < h3 class ="code-header "> impl<E, I, H> < a class ="trait " href ="trait.DigestAlgorithm.html " title ="trait jf_merkle_tree::DigestAlgorithm "> DigestAlgorithm</ a > <E, I, < a class ="struct " href ="hasher/struct.HasherNode.html " title ="struct jf_merkle_tree::hasher::HasherNode "> HasherNode</ a > <H>> for < a class ="struct " href ="hasher/struct.HasherDigestAlgorithm.html " title ="struct jf_merkle_tree::hasher::HasherDigestAlgorithm "> HasherDigestAlgorithm</ a > < div class ="where "> where
16+ S: Permutation<U = F> + < a class ="trait " href ="../jf_poseidon2/sponge/trait.Poseidon2Sponge.html " title ="trait jf_poseidon2::sponge::Poseidon2Sponge "> Poseidon2Sponge</ a > ,</ div > </ h3 > </ section > </ summary > < div class ="impl-items "> < section id ="method.digest " class ="method trait-impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#88-92 "> Source</ a > < a href ="#method.digest " class ="anchor "> §</ a > < h4 class ="code-header "> fn < a href ="#tymethod.digest " class ="fn "> digest</ a > (data: &< a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.slice.html "> [F]</ a > ) -> < a class ="enum " href ="https://doc.rust-lang.org/1.89.0/core/result/enum.Result.html " title ="enum core::result::Result "> Result</ a > <F, < a class ="enum " href ="errors/enum.MerkleTreeError.html " title ="enum jf_merkle_tree::errors::MerkleTreeError "> MerkleTreeError</ a > ></ h4 > </ section > < section id ="method.digest_leaf " class ="method trait-impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#94-106 "> Source</ a > < a href ="#method.digest_leaf " class ="anchor "> §</ a > < h4 class ="code-header "> fn < a href ="#tymethod.digest_leaf " class ="fn "> digest_leaf</ a > (pos: < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html "> &I</ a > , elem: < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.reference.html "> &F</ a > ) -> < a class ="enum " href ="https://doc.rust-lang.org/1.89.0/core/result/enum.Result.html " title ="enum core::result::Result "> Result</ a > <F, < a class ="enum " href ="errors/enum.MerkleTreeError.html " title ="enum jf_merkle_tree::errors::MerkleTreeError "> MerkleTreeError</ a > ></ h4 > </ section > </ div > </ details > < h2 id ="implementors " class ="section-header "> Implementors< a href ="#implementors " class ="anchor "> §</ a > </ h2 > < div id ="implementors-list "> < section id ="impl-DigestAlgorithm%3CE,+I,+HasherNode%3CH%3E%3E-for-HasherDigestAlgorithm " class ="impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/hasher.rs.html#144-168 "> Source</ a > < a href ="#impl-DigestAlgorithm%3CE,+I,+HasherNode%3CH%3E%3E-for-HasherDigestAlgorithm " class ="anchor "> §</ a > < h3 class ="code-header "> impl<E, I, H> < a class ="trait " href ="trait.DigestAlgorithm.html " title ="trait jf_merkle_tree::DigestAlgorithm "> DigestAlgorithm</ a > <E, I, < a class ="struct " href ="hasher/struct.HasherNode.html " title ="struct jf_merkle_tree::hasher::HasherNode "> HasherNode</ a > <H>> for < a class ="struct " href ="hasher/struct.HasherDigestAlgorithm.html " title ="struct jf_merkle_tree::hasher::HasherDigestAlgorithm "> HasherDigestAlgorithm</ a > < div class ="where "> where
1717 E: < a class ="trait " href ="trait.Element.html " title ="trait jf_merkle_tree::Element "> Element</ a > + CanonicalSerialize,
1818 I: < a class ="trait " href ="trait.Index.html " title ="trait jf_merkle_tree::Index "> Index</ a > + CanonicalSerialize,
1919 H: < a class ="trait " href ="hasher/trait.HasherDigest.html " title ="trait jf_merkle_tree::hasher::HasherDigest "> HasherDigest</ a > ,</ div > </ h3 > </ section > < section id ="impl-DigestAlgorithm%3CE,+I,+Keccak256Node%3E-for-Keccak256Digest " class ="impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#194 "> Source</ a > < a href ="#impl-DigestAlgorithm%3CE,+I,+Keccak256Node%3E-for-Keccak256Digest " class ="anchor "> §</ a > < h3 class ="code-header "> impl<E: < a class ="trait " href ="trait.Element.html " title ="trait jf_merkle_tree::Element "> Element</ a > + CanonicalSerialize, I: < a class ="trait " href ="trait.Index.html " title ="trait jf_merkle_tree::Index "> Index</ a > > < a class ="trait " href ="trait.DigestAlgorithm.html " title ="trait jf_merkle_tree::DigestAlgorithm "> DigestAlgorithm</ a > <E, I, < a class ="struct " href ="prelude/struct.Keccak256Node.html " title ="struct jf_merkle_tree::prelude::Keccak256Node "> Keccak256Node</ a > > for < a class ="struct " href ="prelude/struct.Keccak256Digest.html " title ="struct jf_merkle_tree::prelude::Keccak256Digest "> Keccak256Digest</ a > </ h3 > </ section > < section id ="impl-DigestAlgorithm%3CE,+I,+Sha3Node%3E-for-Sha3Digest " class ="impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#193 "> Source</ a > < a href ="#impl-DigestAlgorithm%3CE,+I,+Sha3Node%3E-for-Sha3Digest " class ="anchor "> §</ a > < h3 class ="code-header "> impl<E: < a class ="trait " href ="trait.Element.html " title ="trait jf_merkle_tree::Element "> Element</ a > + CanonicalSerialize, I: < a class ="trait " href ="trait.Index.html " title ="trait jf_merkle_tree::Index "> Index</ a > > < a class ="trait " href ="trait.DigestAlgorithm.html " title ="trait jf_merkle_tree::DigestAlgorithm "> DigestAlgorithm</ a > <E, I, < a class ="struct " href ="prelude/struct.Sha3Node.html " title ="struct jf_merkle_tree::prelude::Sha3Node "> Sha3Node</ a > > for < a class ="struct " href ="prelude/struct.Sha3Digest.html " title ="struct jf_merkle_tree::prelude::Sha3Digest "> Sha3Digest</ a > </ h3 > </ section > < section id ="impl-DigestAlgorithm%3CInterval%3CF%3E,+u64,+F%3E-for-RescueHash%3CF%3E " class ="impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/examples.rs.html#21-34 "> Source</ a > < a href ="#impl-DigestAlgorithm%3CInterval%3CF%3E,+u64,+F%3E-for-RescueHash%3CF%3E " class ="anchor "> §</ a > < h3 class ="code-header "> impl<F: RescueParameter> < a class ="trait " href ="trait.DigestAlgorithm.html " title ="trait jf_merkle_tree::DigestAlgorithm "> DigestAlgorithm</ a > << a class ="struct " href ="examples/struct.Interval.html " title ="struct jf_merkle_tree::examples::Interval "> Interval</ a > <F>, < a class ="primitive " href ="https://doc.rust-lang.org/1.89.0/std/primitive.u64.html "> u64</ a > , F> for < a class ="struct " href ="prelude/struct.RescueHash.html " title ="struct jf_merkle_tree::prelude::RescueHash "> RescueHash</ a > <F></ h3 > </ section > < section id ="impl-DigestAlgorithm%3CF,+I,+F%3E-for-RescueHash%3CF%3E " class ="impl "> < a class ="src rightside " href ="../src/jf_merkle_tree/prelude.rs.html#56-67 "> Source</ a > < a href ="#impl-DigestAlgorithm%3CF,+I,+F%3E-for-RescueHash%3CF%3E " class ="anchor "> §</ a > < h3 class ="code-header "> impl<I: < a class ="trait " href ="trait.Index.html " title ="trait jf_merkle_tree::Index "> Index</ a > , F: RescueParameter + < a class ="trait " href ="https://doc.rust-lang.org/1.89.0/core/convert/trait.From.html " title ="trait core::convert::From "> From</ a > <I>> < a class ="trait " href ="trait.DigestAlgorithm.html " title ="trait jf_merkle_tree::DigestAlgorithm "> DigestAlgorithm</ a > <F, I, F> for < a class ="struct " href ="prelude/struct.RescueHash.html " title ="struct jf_merkle_tree::prelude::RescueHash "> RescueHash</ a > <F></ h3 > </ section > </ div > < script src ="../trait.impl/jf_merkle_tree/trait.DigestAlgorithm.js " data-ignore-extern-crates ="jf_poseidon2 " async > </ script > </ section > </ div > </ main > </ body > </ html >
0 commit comments