[−][src]Struct gcrypt::mpi::integer::Integer
Methods
impl Integer
[src]
pub unsafe fn from_raw(raw: gcry_mpi_t) -> Self
[src]
pub fn as_raw(&self) -> gcry_mpi_t
[src]
pub fn into_raw(self) -> gcry_mpi_t
[src]
pub fn zero() -> Integer
[src]
pub fn one() -> Integer
[src]
pub fn new(nbits: u32) -> Integer
[src]
pub fn new_secure(nbits: u32) -> Integer
[src]
pub fn from_uint(n: u32) -> Integer
[src]
pub fn from_bytes(format: Format, bytes: impl AsRef<[u8]>) -> Result<Integer>
[src]
pub fn from_str(s: impl CStrArgument) -> Result<Integer>
[src]
pub fn to_bytes(&self, format: Format) -> Result<Buffer>
[src]
pub fn len_encoded(&self, format: Format) -> Result<usize>
[src]
pub fn encode(&self, format: Format, buf: &mut [u8]) -> Result<usize>
[src]
pub fn set(&mut self, n: u32)
[src]
pub fn randomize(&mut self, nbits: u32, level: Level)
[src]
pub fn num_bits(&self) -> usize
[src]
pub fn is_prime(&self) -> bool
[src]
pub fn is_positive(&self) -> bool
[src]
pub fn is_negative(&self) -> bool
[src]
pub fn abs(self) -> Integer
[src]
pub fn add_mod(self, other: &Integer, m: &Integer) -> Integer
[src]
pub fn sub_mod(self, other: &Integer, m: &Integer) -> Integer
[src]
pub fn mul_mod(self, other: &Integer, m: &Integer) -> Integer
[src]
pub fn inv_mod(self, m: &Integer) -> Option<Integer>
[src]
pub fn div_floor(self, other: &Integer) -> Integer
[src]
pub fn mod_floor(self, other: &Integer) -> Integer
[src]
pub fn div_rem(self, other: &Integer) -> (Integer, Integer)
[src]
pub fn div_mod_floor(self, other: &Integer) -> (Integer, Integer)
[src]
pub fn ldexp(self, e: u32) -> Integer
[src]
pub fn pow_mod(self, e: &Integer, m: &Integer) -> Integer
[src]
pub fn gcd(self, other: &Integer) -> Integer
[src]
pub fn lcm(self, other: &Integer) -> Integer
[src]
Trait Implementations
impl<'a> Add<&'a Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the +
operator.
fn add(self, other: &'a Integer) -> Integer
[src]
impl Add<Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the +
operator.
fn add(self, other: Integer) -> Integer
[src]
impl<'a> Add<Integer> for &'a Integer
[src]
type Output = Integer
The resulting type after applying the +
operator.
fn add(self, other: Integer) -> Integer
[src]
impl Clone for Integer
[src]
impl Debug for Integer
[src]
impl Default for Integer
[src]
impl<'a> Div<&'a Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the /
operator.
fn div(self, other: &'a Integer) -> Integer
[src]
impl Div<Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the /
operator.
fn div(self, other: Integer) -> Integer
[src]
impl<'a> Div<Integer> for &'a Integer
[src]
type Output = Integer
The resulting type after applying the /
operator.
fn div(self, other: Integer) -> Integer
[src]
impl Drop for Integer
[src]
impl Eq for Integer
[src]
impl From<u32> for Integer
[src]
impl<'a> Mul<&'a Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the *
operator.
fn mul(self, other: &'a Integer) -> Integer
[src]
impl Mul<Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the *
operator.
fn mul(self, other: Integer) -> Integer
[src]
impl<'a> Mul<Integer> for &'a Integer
[src]
type Output = Integer
The resulting type after applying the *
operator.
fn mul(self, other: Integer) -> Integer
[src]
impl Neg for Integer
[src]
impl<'_> Neg for &'_ Integer
[src]
impl Ord for Integer
[src]
fn cmp(&self, other: &Integer) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Integer> for u32
[src]
impl PartialEq<Integer> for Integer
[src]
impl PartialEq<u32> for Integer
[src]
impl PartialOrd<Integer> for u32
[src]
fn partial_cmp(&self, other: &Integer) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Integer> for Integer
[src]
fn partial_cmp(&self, other: &Integer) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<u32> for Integer
[src]
fn partial_cmp(&self, other: &u32) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'a> Rem<&'a Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the %
operator.
fn rem(self, other: &'a Integer) -> Integer
[src]
impl Rem<Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the %
operator.
fn rem(self, other: Integer) -> Integer
[src]
impl<'a> Rem<Integer> for &'a Integer
[src]
type Output = Integer
The resulting type after applying the %
operator.
fn rem(self, other: Integer) -> Integer
[src]
impl Shl<usize> for Integer
[src]
type Output = Integer
The resulting type after applying the <<
operator.
fn shl(self, other: usize) -> Integer
[src]
impl Shr<usize> for Integer
[src]
type Output = Integer
The resulting type after applying the >>
operator.
fn shr(self, other: usize) -> Integer
[src]
impl<'a> Sub<&'a Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the -
operator.
fn sub(self, other: &'a Integer) -> Integer
[src]
impl Sub<Integer> for Integer
[src]
type Output = Integer
The resulting type after applying the -
operator.
fn sub(self, other: Integer) -> Integer
[src]
impl<'a> Sub<Integer> for &'a Integer
[src]
Auto Trait Implementations
impl RefUnwindSafe for Integer
impl !Send for Integer
impl !Sync for Integer
impl Unpin for Integer
impl UnwindSafe for Integer
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> 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>,