Rename function to indicate that it returns the number of attributes

This commit is contained in:
aniampio
2021-11-03 16:09:46 +00:00
parent aa2410c99b
commit a75ca9f114
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -446,7 +446,7 @@ impl ProofKappaNu {
}
}
pub(crate) fn private_attributes(&self) -> usize {
pub(crate) fn private_attributes_len(&self) -> usize {
2
}
+2 -2
View File
@@ -215,7 +215,7 @@ pub fn verify_credential(
theta: &Theta,
public_attributes: &[Attribute],
) -> bool {
if public_attributes.len() + theta.pi_v.private_attributes() > verification_key.beta.len() {
if public_attributes.len() + theta.pi_v.private_attributes_len() > verification_key.beta.len() {
return false;
}
@@ -232,7 +232,7 @@ pub fn verify_credential(
verification_key
.beta
.iter()
.skip(theta.pi_v.private_attributes()),
.skip(theta.pi_v.private_attributes_len()),
)
.map(|(pub_attr, beta_i)| beta_i * pub_attr)
.sum::<G2Projective>();