[][src]Struct gcrypt::mpi::integer::Integer

pub struct 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.

impl Add<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the + operator.

impl<'a> Add<Integer> for &'a Integer[src]

type Output = Integer

The resulting type after applying the + operator.

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.

impl Div<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the / operator.

impl<'a> Div<Integer> for &'a Integer[src]

type Output = Integer

The resulting type after applying the / operator.

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.

impl Mul<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl<'a> Mul<Integer> for &'a Integer[src]

type Output = Integer

The resulting type after applying the * operator.

impl Neg for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl<'_> Neg for &'_ Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Ord for Integer[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]

impl PartialOrd<Integer> for Integer[src]

impl PartialOrd<u32> for Integer[src]

impl<'a> Rem<&'a Integer> for Integer[src]

type Output = Integer

The resulting type after applying the % operator.

impl Rem<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the % operator.

impl<'a> Rem<Integer> for &'a Integer[src]

type Output = Integer

The resulting type after applying the % operator.

impl Shl<usize> for Integer[src]

type Output = Integer

The resulting type after applying the << operator.

impl Shr<usize> for Integer[src]

type Output = Integer

The resulting type after applying the >> operator.

impl<'a> Sub<&'a Integer> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl Sub<Integer> for Integer[src]

type Output = Integer

The resulting type after applying the - operator.

impl<'a> Sub<Integer> for &'a Integer[src]

type Output = Integer

The resulting type after applying the - operator.

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.