Struct p256::P256Scalar
source · pub struct P256Scalar { /* private fields */ }
Trait Implementations§
source§impl Add for P256Scalar
impl Add for P256Scalar
source§impl AsRef<[u8]> for P256Scalar
impl AsRef<[u8]> for P256Scalar
source§impl Clone for P256Scalar
impl Clone for P256Scalar
source§fn clone(&self) -> P256Scalar
fn clone(&self) -> P256Scalar
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 P256Scalar
impl Debug for P256Scalar
source§impl Display for P256Scalar
impl Display for P256Scalar
source§impl Mul for P256Scalar
impl Mul for P256Scalar
source§impl NatMod<32> for P256Scalar
impl NatMod<32> for P256Scalar
const MODULUS: [u8; 32] = _
const MODULUS_STR: &'static str = "ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"
const ZERO: [u8; 32] = _
fn new(value: [u8; 32]) -> 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 P256Scalar
impl PartialEq for P256Scalar
source§fn eq(&self, other: &P256Scalar) -> bool
fn eq(&self, other: &P256Scalar) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Sub for P256Scalar
impl Sub for P256Scalar
impl Copy for P256Scalar
impl Eq for P256Scalar
impl StructuralPartialEq for P256Scalar
Auto Trait Implementations§
impl Freeze for P256Scalar
impl RefUnwindSafe for P256Scalar
impl Send for P256Scalar
impl Sync for P256Scalar
impl Unpin for P256Scalar
impl UnwindSafe for P256Scalar
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