Struct hacspec_poly1305::FieldElement
source · pub struct FieldElement { /* private fields */ }
Trait Implementations§
source§impl Add for FieldElement
impl Add for FieldElement
source§impl AsRef<[u8]> for FieldElement
impl AsRef<[u8]> for FieldElement
source§impl Clone for FieldElement
impl Clone for FieldElement
source§fn clone(&self) -> FieldElement
fn clone(&self) -> FieldElement
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FieldElement
impl Debug for FieldElement
source§impl Display for FieldElement
impl Display for FieldElement
source§impl Mul for FieldElement
impl Mul for FieldElement
source§impl NatMod<17> for FieldElement
impl NatMod<17> for FieldElement
const MODULUS: [u8; 17] = _
const MODULUS_STR: &'static str = "03fffffffffffffffffffffffffffffffb"
const ZERO: [u8; 17] = _
fn new(value: [u8; 17]) -> Self
fn value(&self) -> &[u8] ⓘ
§fn fsub(self, rhs: Self) -> Selfwhere
Self: Sized,
fn fsub(self, rhs: Self) -> Selfwhere
Self: Sized,
Sub self with
rhs
and return the result self - rhs % MODULUS
.§fn fadd(self, rhs: Self) -> Selfwhere
Self: Sized,
fn fadd(self, rhs: Self) -> Selfwhere
Self: Sized,
Add self with
rhs
and return the result self + rhs % MODULUS
.§fn fmul(self, rhs: Self) -> Selfwhere
Self: Sized,
fn fmul(self, rhs: Self) -> Selfwhere
Self: Sized,
Multiply self with
rhs
and return the result self * rhs % MODULUS
.fn inv0(self) -> Selfwhere
Self: Sized,
fn bit(&self, bit: u128) -> bool
fn neg(self) -> Selfwhere
Self: Sized,
§fn from_le_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
fn from_le_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
Create a new [
#ident
] from a little endian byte slice. Read more§fn from_be_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
fn from_be_bytes(bytes: &[u8]) -> Selfwhere
Self: Sized,
Create a new [
#ident
] from a little endian byte slice. Read morefn to_le_bytes(self) -> [u8; LEN]where
Self: Sized,
fn to_be_bytes(self) -> [u8; LEN]where
Self: Sized,
fn pad(bytes: &[u8]) -> [u8; LEN]
fn from_bigint(x: BigUint) -> Selfwhere
Self: Sized,
source§impl PartialEq for FieldElement
impl PartialEq for FieldElement
source§fn eq(&self, other: &FieldElement) -> bool
fn eq(&self, other: &FieldElement) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Sub for FieldElement
impl Sub for FieldElement
impl Copy for FieldElement
impl Eq for FieldElement
impl StructuralPartialEq for FieldElement
Auto Trait Implementations§
impl Freeze for FieldElement
impl RefUnwindSafe for FieldElement
impl Send for FieldElement
impl Sync for FieldElement
impl Unpin for FieldElement
impl UnwindSafe for FieldElement
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more