Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,12 @@ pub trait PrimeField: Field {
Some(res)
}

/// Convert this prime field element into a biginteger representation.
/// Converts a field element, represented as a biginteger, to a `PrimeField`
/// field element. Returns an error if the biginteger is not an element of
/// this prime field.
fn from_repr(Self::Repr) -> Result<Self, PrimeFieldDecodingError>;

/// Convert a biginteger representation into a prime field element, if
/// the number is an element of the field.
/// Returns the biginteger representation of this `PrimeField` field element.
fn into_repr(&self) -> Self::Repr;

/// Returns the field characteristic; the modulus.
Expand Down