Move pedersen hash test vectors into Sapling
This commit is contained in:
parent
bc087a5ff7
commit
abbf5dfd83
|
@ -1,5 +1,8 @@
|
|||
//! Implementation of the Pedersen hash function used in Sapling.
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod test_vectors;
|
||||
|
||||
use byteorder::{ByteOrder, LittleEndian};
|
||||
use ff::PrimeField;
|
||||
use group::Group;
|
||||
|
@ -124,7 +127,6 @@ pub mod test {
|
|||
use group::Curve;
|
||||
|
||||
use super::*;
|
||||
use crate::test_vectors::pedersen_hash_vectors;
|
||||
|
||||
pub struct TestVector<'a> {
|
||||
pub personalization: Personalization,
|
||||
|
@ -135,7 +137,7 @@ pub mod test {
|
|||
|
||||
#[test]
|
||||
fn test_pedersen_hash_points() {
|
||||
let test_vectors = pedersen_hash_vectors::get_vectors();
|
||||
let test_vectors = test_vectors::get_vectors();
|
||||
|
||||
assert!(!test_vectors.is_empty());
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! Test vectors from https://github.com/zcash-hackworks/zcash-test-vectors/blob/master/sapling_pedersen.py
|
||||
|
||||
use crate::sapling::pedersen_hash::{test::TestVector, Personalization};
|
||||
use super::{test::TestVector, Personalization};
|
||||
|
||||
pub fn get_vectors<'a>() -> Vec<TestVector<'a>> {
|
||||
return vec![
|
|
@ -1,2 +1 @@
|
|||
pub(crate) mod note_encryption;
|
||||
pub(crate) mod pedersen_hash_vectors;
|
||||
|
|
Loading…
Reference in New Issue