Field
Add into_repr method. This is needed at least while we have Bn254 intead of a generic field impl
@@ -122,6 +122,12 @@ impl FieldElement {
FieldElement(inv)
}
+ // XXX: This method is used while this field element
+ // implementation is not generic.
+ pub fn into_repr(self) -> Fr {
+ self.0
+ }
+
pub fn to_hex(&self) -> String {
let mut bytes = to_bytes!(self.0).unwrap();
bytes.reverse();
