ff: Rename PrimeField::into_repr -> PrimeField::to_repr

This commit is contained in:
Jack Grigg
2020-05-02 18:55:13 +12:00
parent 9114c367f4
commit c597db59a6
35 changed files with 106 additions and 106 deletions

View File

@@ -90,7 +90,7 @@ fn random_wnaf_tests<G: CurveProjective>() {
g1.mul_assign(s);
wnaf_table(&mut table, g, w);
wnaf_form(&mut wnaf, s.into_repr(), w);
wnaf_form(&mut wnaf, s.to_repr(), w);
let g2 = wnaf_exp(&table, &wnaf);
assert_eq!(g1, g2);

View File

@@ -149,7 +149,7 @@ impl<G: CurveProjective> Wnaf<(), Vec<G>, Vec<i64>> {
let window_size = G::recommended_wnaf_for_scalar(&scalar);
// Compute the wNAF form of the scalar.
wnaf_form(&mut self.scalar, scalar.into_repr(), window_size);
wnaf_form(&mut self.scalar, scalar.to_repr(), window_size);
// Return a Wnaf object that mutably borrows the base storage location, but
// immutably borrows the computed wNAF form scalar location.
@@ -203,7 +203,7 @@ impl<B, S: AsMut<Vec<i64>>> Wnaf<usize, B, S> {
where
B: AsRef<[G]>,
{
wnaf_form(self.scalar.as_mut(), scalar.into_repr(), self.window_size);
wnaf_form(self.scalar.as_mut(), scalar.to_repr(), self.window_size);
wnaf_exp(self.base.as_ref(), self.scalar.as_mut())
}
}