diff --git a/accounts/src/key_management/mod.rs b/accounts/src/key_management/mod.rs index 8025d50..25673f6 100644 --- a/accounts/src/key_management/mod.rs +++ b/accounts/src/key_management/mod.rs @@ -112,10 +112,9 @@ mod tests { Aes256Gcm, }; use constants_types::{CipherText, Nonce}; - use constants_types::{NULLIFIER_SECRET_CONST, VIEVING_SECRET_CONST}; + use constants_types::{NULLIFIER_SECRET_CONST, VIEWING_SECRET_CONST}; use elliptic_curve::ff::Field; use elliptic_curve::group::prime::PrimeCurveAffine; - use elliptic_curve::group::GroupEncoding; use k256::{AffinePoint, ProjectivePoint, Scalar}; use super::*; @@ -360,9 +359,9 @@ mod tests { ); println!( "Nullifier constant {:?}", - hex::encode(NULLIFIER_SECRET_CONST) + hex::encode(*NULLIFIER_SECRET_CONST) ); - println!("Viewing constatnt {:?}", hex::encode(VIEVING_SECRET_CONST)); + println!("Viewing constatnt {:?}", hex::encode(*VIEWING_SECRET_CONST)); println!(); println!("======Holders======"); diff --git a/accounts/src/key_management/secret_holders.rs b/accounts/src/key_management/secret_holders.rs index 7ae67a7..399ef44 100644 --- a/accounts/src/key_management/secret_holders.rs +++ b/accounts/src/key_management/secret_holders.rs @@ -4,7 +4,7 @@ use k256::{AffinePoint, FieldBytes, Scalar}; use rand::{rngs::OsRng, RngCore}; use sha2::{digest::FixedOutput, Digest}; -use super::constants_types::{NULLIFIER_SECRET_CONST, VIEVING_SECRET_CONST}; +use super::constants_types::{NULLIFIER_SECRET_CONST, VIEWING_SECRET_CONST}; #[derive(Debug)] ///Seed holder. Non-clonable to ensure that different holders use different seeds. @@ -63,7 +63,7 @@ impl TopSecretKeyHolder { let mut hasher = sha2::Sha256::new(); hasher.update(self.secret_spending_key.to_bytes()); - hasher.update(NULLIFIER_SECRET_CONST); + hasher.update(*NULLIFIER_SECRET_CONST); let hash = ::from(hasher.finalize_fixed()); @@ -74,7 +74,7 @@ impl TopSecretKeyHolder { let mut hasher = sha2::Sha256::new(); hasher.update(self.secret_spending_key.to_bytes()); - hasher.update(VIEVING_SECRET_CONST); + hasher.update(*VIEWING_SECRET_CONST); let hash = ::from(hasher.finalize_fixed());