mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-01-02 21:33:09 +00:00
fix const use
This commit is contained in:
parent
35cc38a947
commit
b85633fa6e
@ -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======");
|
||||
|
||||
@ -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 = <TreeHashType>::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 = <TreeHashType>::from(hasher.finalize_fixed());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user