Add a nicer multiple test
This commit is contained in:
parent
61753462e5
commit
21189374d7
|
@ -399,10 +399,11 @@ mod tests {
|
|||
fn test_multiple() {
|
||||
let secret_keys: Vec<FuzzySecretKey> = (0..3).map(|_x| FuzzySecretKey::generate(24)).collect();
|
||||
let public_keys: Vec<FuzzyPublicKey> = secret_keys.iter().map(|x| x.public_key()).collect();
|
||||
let entangled_tag = FuzzyPublicKey::generate_entangled_tag(public_keys, 8);
|
||||
// it takes ~15 minutes on a standard desktop to find a length=24 match for 2 parties, so for testing let's keep things light
|
||||
let entangled_tag = FuzzyPublicKey::generate_entangled_tag(public_keys, 6);
|
||||
println!("{}", entangled_tag);
|
||||
for secret_key in secret_keys.iter() {
|
||||
let detection_key = secret_key.extract(8);
|
||||
let detection_key = secret_key.extract(6);
|
||||
assert!(detection_key.test_tag(&entangled_tag));
|
||||
println!("{}", detection_key);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue