pub type OddUint<const LIMBS: usize> = Odd<Uint<LIMBS>>;Expand description
Odd unsigned integer.
Aliased Type§
pub struct OddUint<const LIMBS: usize>(/* private fields */);Implementations§
Source§impl<const LIMBS: usize> OddUint<LIMBS>
impl<const LIMBS: usize> OddUint<LIMBS>
Sourcepub const fn from_be_hex(hex: &str) -> Self
pub const fn from_be_hex(hex: &str) -> Self
Sourcepub const fn from_le_hex(hex: &str) -> Self
pub const fn from_le_hex(hex: &str) -> Self
Create a new Odd<Uint<LIMBS>> from the provided little endian hex string.
§Panics
- if the hex is malformed or not zero-padded accordingly for the size.
- if the value is even.
Sourcepub const fn as_uint_ref(&self) -> &OddUintRef
pub const fn as_uint_ref(&self) -> &OddUintRef
Borrow this OddUint as a &OddUintRef.
Source§impl<const LIMBS: usize> OddUint<LIMBS>
impl<const LIMBS: usize> OddUint<LIMBS>
Sourcepub const fn gcd_unsigned(&self, rhs: &Uint<LIMBS>) -> Self
pub const fn gcd_unsigned(&self, rhs: &Uint<LIMBS>) -> Self
Compute the greatest common divisor of self and rhs.
Sourcepub const fn gcd_unsigned_vartime(&self, rhs: &Uint<LIMBS>) -> Self
pub const fn gcd_unsigned_vartime(&self, rhs: &Uint<LIMBS>) -> Self
Compute the greatest common divisor of self and rhs.
Executes in variable time w.r.t. all input parameters.
Trait Implementations§
Source§impl<const LIMBS: usize> AsRef<Odd<UintRef>> for OddUint<LIMBS>
impl<const LIMBS: usize> AsRef<Odd<UintRef>> for OddUint<LIMBS>
Source§fn as_ref(&self) -> &OddUintRef
fn as_ref(&self) -> &OddUintRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl<const LIMBS: usize> Gcd<NonZero<Uint<LIMBS>>> for OddUint<LIMBS>
impl<const LIMBS: usize> Gcd<NonZero<Uint<LIMBS>>> for OddUint<LIMBS>
Source§fn gcd(&self, rhs: &NonZeroUint<LIMBS>) -> Self::Output
fn gcd(&self, rhs: &NonZeroUint<LIMBS>) -> Self::Output
Compute the greatest common divisor of
self and rhs.Source§fn gcd_vartime(&self, rhs: &NonZeroUint<LIMBS>) -> Self::Output
fn gcd_vartime(&self, rhs: &NonZeroUint<LIMBS>) -> Self::Output
Compute the greatest common divisor of
self and rhs in variable time.