[−][src]Struct indy_crypto::bn::BigNumber
Methods
impl BigNumber
[src]
impl BigNumber
pub fn new_context() -> Result<BigNumberContext, IndyCryptoError>
[src]
pub fn new_context() -> Result<BigNumberContext, IndyCryptoError>
pub fn new() -> Result<BigNumber, IndyCryptoError>
[src]
pub fn new() -> Result<BigNumber, IndyCryptoError>
pub fn generate_prime(size: usize) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn generate_prime(size: usize) -> Result<BigNumber, IndyCryptoError>
pub fn generate_safe_prime(size: usize) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn generate_safe_prime(size: usize) -> Result<BigNumber, IndyCryptoError>
pub fn generate_prime_in_range(
start: &BigNumber,
end: &BigNumber
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn generate_prime_in_range(
start: &BigNumber,
end: &BigNumber
) -> Result<BigNumber, IndyCryptoError>
pub fn is_prime(
&self,
ctx: Option<&mut BigNumberContext>
) -> Result<bool, IndyCryptoError>
[src]
pub fn is_prime(
&self,
ctx: Option<&mut BigNumberContext>
) -> Result<bool, IndyCryptoError>
pub fn is_safe_prime(
&self,
ctx: Option<&mut BigNumberContext>
) -> Result<bool, IndyCryptoError>
[src]
pub fn is_safe_prime(
&self,
ctx: Option<&mut BigNumberContext>
) -> Result<bool, IndyCryptoError>
pub fn rand(size: usize) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn rand(size: usize) -> Result<BigNumber, IndyCryptoError>
pub fn rand_range(&self) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn rand_range(&self) -> Result<BigNumber, IndyCryptoError>
pub fn num_bits(&self) -> Result<i32, IndyCryptoError>
[src]
pub fn num_bits(&self) -> Result<i32, IndyCryptoError>
pub fn is_bit_set(&self, n: i32) -> Result<bool, IndyCryptoError>
[src]
pub fn is_bit_set(&self, n: i32) -> Result<bool, IndyCryptoError>
pub fn set_bit(&mut self, n: i32) -> Result<&mut BigNumber, IndyCryptoError>
[src]
pub fn set_bit(&mut self, n: i32) -> Result<&mut BigNumber, IndyCryptoError>
pub fn from_u32(n: usize) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn from_u32(n: usize) -> Result<BigNumber, IndyCryptoError>
pub fn from_dec(dec: &str) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn from_dec(dec: &str) -> Result<BigNumber, IndyCryptoError>
pub fn from_hex(hex: &str) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn from_hex(hex: &str) -> Result<BigNumber, IndyCryptoError>
pub fn from_bytes(bytes: &[u8]) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<BigNumber, IndyCryptoError>
pub fn to_dec(&self) -> Result<String, IndyCryptoError>
[src]
pub fn to_dec(&self) -> Result<String, IndyCryptoError>
pub fn to_hex(&self) -> Result<String, IndyCryptoError>
[src]
pub fn to_hex(&self) -> Result<String, IndyCryptoError>
pub fn to_bytes(&self) -> Result<Vec<u8>, IndyCryptoError>
[src]
pub fn to_bytes(&self) -> Result<Vec<u8>, IndyCryptoError>
pub fn hash(data: &[u8]) -> Result<Vec<u8>, IndyCryptoError>
[src]
pub fn hash(data: &[u8]) -> Result<Vec<u8>, IndyCryptoError>
pub fn add(&self, a: &BigNumber) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn add(&self, a: &BigNumber) -> Result<BigNumber, IndyCryptoError>
pub fn sub(&self, a: &BigNumber) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn sub(&self, a: &BigNumber) -> Result<BigNumber, IndyCryptoError>
pub fn sqr(
&self,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn sqr(
&self,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn mul(
&self,
a: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn mul(
&self,
a: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn mod_mul(
&self,
a: &BigNumber,
n: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn mod_mul(
&self,
a: &BigNumber,
n: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn mod_sub(
&self,
a: &BigNumber,
n: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn mod_sub(
&self,
a: &BigNumber,
n: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn div(
&self,
a: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn div(
&self,
a: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn add_word(&mut self, w: u32) -> Result<&mut BigNumber, IndyCryptoError>
[src]
pub fn add_word(&mut self, w: u32) -> Result<&mut BigNumber, IndyCryptoError>
pub fn sub_word(&mut self, w: u32) -> Result<&mut BigNumber, IndyCryptoError>
[src]
pub fn sub_word(&mut self, w: u32) -> Result<&mut BigNumber, IndyCryptoError>
pub fn mul_word(&mut self, w: u32) -> Result<&mut BigNumber, IndyCryptoError>
[src]
pub fn mul_word(&mut self, w: u32) -> Result<&mut BigNumber, IndyCryptoError>
pub fn div_word(&mut self, w: u32) -> Result<&mut BigNumber, IndyCryptoError>
[src]
pub fn div_word(&mut self, w: u32) -> Result<&mut BigNumber, IndyCryptoError>
pub fn mod_exp(
&self,
a: &BigNumber,
b: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn mod_exp(
&self,
a: &BigNumber,
b: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn modulus(
&self,
a: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn modulus(
&self,
a: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn exp(
&self,
a: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn exp(
&self,
a: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn inverse(
&self,
n: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn inverse(
&self,
n: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn set_negative(&self, negative: bool) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn set_negative(&self, negative: bool) -> Result<BigNumber, IndyCryptoError>
pub fn is_negative(&self) -> bool
[src]
pub fn is_negative(&self) -> bool
pub fn increment(&self) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn increment(&self) -> Result<BigNumber, IndyCryptoError>
pub fn decrement(&self) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn decrement(&self) -> Result<BigNumber, IndyCryptoError>
pub fn lshift1(&self) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn lshift1(&self) -> Result<BigNumber, IndyCryptoError>
pub fn rshift1(&self) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn rshift1(&self) -> Result<BigNumber, IndyCryptoError>
pub fn rshift(&self, n: i32) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn rshift(&self, n: i32) -> Result<BigNumber, IndyCryptoError>
pub fn mod_div(
&self,
b: &BigNumber,
p: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn mod_div(
&self,
b: &BigNumber,
p: &BigNumber,
ctx: Option<&mut BigNumberContext>
) -> Result<BigNumber, IndyCryptoError>
pub fn random_qr(n: &BigNumber) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn random_qr(n: &BigNumber) -> Result<BigNumber, IndyCryptoError>
pub fn clone(&self) -> Result<BigNumber, IndyCryptoError>
[src]
pub fn clone(&self) -> Result<BigNumber, IndyCryptoError>
pub fn hash_array(nums: &Vec<Vec<u8>>) -> Result<Vec<u8>, IndyCryptoError>
[src]
pub fn hash_array(nums: &Vec<Vec<u8>>) -> Result<Vec<u8>, IndyCryptoError>
Trait Implementations
impl PartialOrd<BigNumber> for BigNumber
[src]
impl PartialOrd<BigNumber> for BigNumber
fn partial_cmp(&self, other: &BigNumber) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &BigNumber) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Default for BigNumber
[src]
impl Default for BigNumber
impl Ord for BigNumber
[src]
impl Ord for BigNumber
fn cmp(&self, other: &BigNumber) -> Ordering
[src]
fn cmp(&self, other: &BigNumber) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialEq<BigNumber> for BigNumber
[src]
impl PartialEq<BigNumber> for BigNumber
fn eq(&self, other: &BigNumber) -> bool
[src]
fn eq(&self, other: &BigNumber) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for BigNumber
[src]
impl Eq for BigNumber
impl Debug for BigNumber
[src]
impl Debug for BigNumber
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Serialize for BigNumber
[src]
impl Serialize for BigNumber
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'a> Deserialize<'a> for BigNumber
[src]
impl<'a> Deserialize<'a> for BigNumber
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'a>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,