[−][src]Struct k256::arithmetic::Scalar
This is supported on
feature="arithmetic"
only.An element in the finite field modulo n.
Methods
impl Scalar
[src]
pub const fn zero() -> Scalar
[src]
This is supported on
feature="arithmetic"
only.Returns the zero scalar.
pub const fn one() -> Scalar
[src]
This is supported on
feature="arithmetic"
only.Returns the multiplicative identity.
pub fn from_bytes(bytes: [u8; 32]) -> CtOption<Self>
[src]
This is supported on
feature="arithmetic"
only.Attempts to parse the given byte array as an SEC-1-encoded scalar.
Returns None if the byte array does not contain a big-endian integer in the range [0, p).
pub fn to_bytes(&self) -> [u8; 32]
[src]
This is supported on
feature="arithmetic"
only.Returns the SEC-1 encoding of this scalar.
Trait Implementations
impl Clone for Scalar
[src]
impl Copy for Scalar
[src]
impl Debug for Scalar
[src]
impl From<u64> for Scalar
[src]
impl<'_, '_> Mul<&'_ Scalar> for &'_ ProjectivePoint
[src]
type Output = ProjectivePoint
The resulting type after applying the *
operator.
fn mul(self, other: &Scalar) -> ProjectivePoint
[src]
impl<'_> Mul<&'_ Scalar> for ProjectivePoint
[src]
type Output = ProjectivePoint
The resulting type after applying the *
operator.
fn mul(self, other: &Scalar) -> ProjectivePoint
[src]
impl<'_> MulAssign<&'_ Scalar> for ProjectivePoint
[src]
fn mul_assign(&mut self, rhs: &Scalar)
[src]
impl MulAssign<Scalar> for ProjectivePoint
[src]
fn mul_assign(&mut self, rhs: Scalar)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Scalar
impl Send for Scalar
impl Sync for Scalar
impl Unpin for Scalar
impl UnwindSafe for Scalar
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,