Struct openssl::bn::BigNum [] [src]

pub struct BigNum(_);

Methods

impl BigNum
[src]

fn new() -> Result<BigNumSslError>

fn new_from(n: u64) -> Result<BigNumSslError>

fn from_dec_str(s: &str) -> Result<BigNumSslError>

fn from_hex_str(s: &str) -> Result<BigNumSslError>

unsafe fn new_from_ffi(orig: *mut BIGNUM) -> Result<BigNumSslError>

fn new_from_slice(n: &[u8]) -> Result<BigNumSslError>

fn checked_sqr(&self) -> Result<BigNumSslError>

fn checked_nnmod(&self, n: &BigNum) -> Result<BigNumSslError>

fn checked_mod_add(&self, a: &BigNum, n: &BigNum) -> Result<BigNumSslError>

fn checked_mod_sub(&self, a: &BigNum, n: &BigNum) -> Result<BigNumSslError>

fn checked_mod_mul(&self, a: &BigNum, n: &BigNum) -> Result<BigNumSslError>

fn checked_mod_sqr(&self, n: &BigNum) -> Result<BigNumSslError>

fn checked_exp(&self, p: &BigNum) -> Result<BigNumSslError>

fn checked_mod_exp(&self, p: &BigNum, n: &BigNum) -> Result<BigNumSslError>

fn checked_mod_inv(&self, n: &BigNum) -> Result<BigNumSslError>

fn add_word(&mut self, w: c_ulong) -> Result<()SslError>

fn sub_word(&mut self, w: c_ulong) -> Result<()SslError>

fn mul_word(&mut self, w: c_ulong) -> Result<()SslError>

fn div_word(&mut self, w: c_ulong) -> Result<c_ulongSslError>

fn mod_word(&self, w: c_ulong) -> Result<c_ulongSslError>

fn checked_gcd(&self, a: &BigNum) -> Result<BigNumSslError>

fn checked_generate_prime(bits: i32, safe: bool, add: Option<&BigNum>, rem: Option<&BigNum>) -> Result<BigNumSslError>

fn is_prime(&self, checks: i32) -> Result<boolSslError>

fn is_prime_fast(&self, checks: i32, do_trial_division: bool) -> Result<boolSslError>

fn checked_new_random(bits: i32, prop: RNGProperty, odd: bool) -> Result<BigNumSslError>

fn checked_new_pseudo_random(bits: i32, prop: RNGProperty, odd: bool) -> Result<BigNumSslError>

fn checked_rand_in_range(&self) -> Result<BigNumSslError>

fn checked_pseudo_rand_in_range(&self) -> Result<BigNumSslError>

fn set_bit(&mut self, n: i32) -> Result<()SslError>

fn clear_bit(&mut self, n: i32) -> Result<()SslError>

fn is_bit_set(&self, n: i32) -> bool

fn mask_bits(&mut self, n: i32) -> Result<()SslError>

fn checked_shl1(&self) -> Result<BigNumSslError>

fn checked_shr1(&self) -> Result<BigNumSslError>

fn checked_add(&self, a: &BigNum) -> Result<BigNumSslError>

fn checked_sub(&self, a: &BigNum) -> Result<BigNumSslError>

fn checked_mul(&self, a: &BigNum) -> Result<BigNumSslError>

fn checked_div(&self, a: &BigNum) -> Result<BigNumSslError>

fn checked_mod(&self, a: &BigNum) -> Result<BigNumSslError>

fn checked_shl(&self, a: &i32) -> Result<BigNumSslError>

fn checked_shr(&self, a: &i32) -> Result<BigNumSslError>

fn negate(&mut self)

fn abs_cmp(&self, oth: BigNum) -> Ordering

fn is_negative(&self) -> bool

fn num_bits(&self) -> i32

fn num_bytes(&self) -> i32

unsafe fn raw(&self) -> *mut BIGNUM

unsafe fn raw_ptr(&self) -> *const *mut BIGNUM

fn into_raw(self) -> *mut BIGNUM

fn to_vec(&self) -> Vec<u8>

fn to_dec_str(&self) -> String

fn to_hex_str(&self) -> String

Trait Implementations

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

type Output = BigNum

The resulting type after applying the + operator

fn add(self, oth: &'a BigNum) -> BigNum

The method for the + operator

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

type Output = BigNum

The resulting type after applying the - operator

fn sub(self, oth: &'a BigNum) -> BigNum

The method for the - operator

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

type Output = BigNum

The resulting type after applying the * operator

fn mul(self, oth: &'a BigNum) -> BigNum

The method for the * operator

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

type Output = BigNum

The resulting type after applying the / operator

fn div(self, oth: &'a BigNum) -> BigNum

The method for the / operator

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

type Output = BigNum

The resulting type after applying the % operator

fn rem(self, oth: &'a BigNum) -> BigNum

The method for the % operator

impl<'a> Shl<i32> for &'a BigNum
[src]

type Output = BigNum

The resulting type after applying the << operator

fn shl(self, n: i32) -> BigNum

The method for the << operator

impl<'a> Shr<i32> for &'a BigNum
[src]

type Output = BigNum

The resulting type after applying the >> operator

fn shr(self, n: i32) -> BigNum

The method for the >> operator

impl Clone for BigNum
[src]

fn clone(&self) -> BigNum

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Neg for BigNum
[src]

type Output = BigNum

The resulting type after applying the - operator

fn neg(self) -> BigNum

The method for the unary - operator

impl Debug for BigNum
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Eq for BigNum
[src]

impl PartialEq for BigNum
[src]

fn eq(&self, oth: &BigNum) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Ord for BigNum
[src]

fn cmp(&self, oth: &BigNum) -> Ordering

This method returns an Ordering between self and other. Read more

impl PartialOrd for BigNum
[src]

fn partial_cmp(&self, oth: &BigNum) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, other: &Rhs) -> bool
1.0.0

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, other: &Rhs) -> bool
1.0.0

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Drop for BigNum
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more