Change IssuerPubKey constructor to be more functional
This commit is contained in:
parent
596cf10ea5
commit
a56ac87868
|
@ -95,9 +95,8 @@ impl IssuerPubKey {
|
||||||
X.push(&privkey.x0tilde * Atable + &privkey.x[0] * Btable);
|
X.push(&privkey.x0tilde * Atable + &privkey.x[0] * Btable);
|
||||||
|
|
||||||
// The other elements (1 through n) are X[i] = x[i]*A
|
// The other elements (1 through n) are X[i] = x[i]*A
|
||||||
for i in 1..n_plus_one {
|
X.extend(privkey.x.iter().skip(1).map(|xi| xi * Atable));
|
||||||
X.push(&privkey.x[i] * Atable);
|
|
||||||
}
|
|
||||||
IssuerPubKey { X }
|
IssuerPubKey { X }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue