Struct optee_utee::arithmetical::BigInt
source · pub struct BigInt(/* private fields */);
Implementations§
source§impl BigInt
impl BigInt
pub fn data_ptr(&self) -> *const u32
pub fn size_in_u32(size: u32) -> u32
pub fn new(bits: u32) -> Self
pub fn convert_from_octet_string( &mut self, buffer: &[u8], sign: i32 ) -> Result<()>
pub fn convert_to_octet_string(&self) -> Result<Vec<u8>>
pub fn convert_from_s32(&mut self, short_val: i32)
pub fn convert_to_s32(&self) -> Result<i32>
pub fn compare_big_int(&self, target: &Self) -> i32
pub fn compare_s32(&self, target: i32) -> i32
pub fn shift_right(&mut self, op: &Self, bits: usize)
pub fn get_bit(&self, bit_index: u32) -> bool
pub fn get_bit_count(&self) -> u32
pub fn add(op1: &Self, op2: &Self) -> Self
pub fn sub(op1: &Self, op2: &Self) -> Self
pub fn neg(op: &Self) -> Self
pub fn multiply(op1: &Self, op2: &Self) -> Self
pub fn square(op: &Self) -> Self
pub fn divide(op1: &Self, op2: &Self) -> (Self, Self)
pub fn module(op: &Self, n: &Self) -> Self
pub fn add_mod(op1: &Self, op2: &Self, n: &Self) -> Self
pub fn sub_mod(op1: &Self, op2: &Self, n: &Self) -> Self
pub fn mul_mod(op1: &Self, op2: &Self, n: &Self) -> Self
pub fn square_mod(op: &Self, n: &Self) -> Self
pub fn inv_mod(op: &Self, n: &Self) -> Self
pub fn relative_prime(op1: &Self, op2: &Self) -> bool
pub fn is_probable_prime(&self, confidence_level: u32) -> i32
pub fn convert_from_big_int_fmm( &mut self, src: &BigIntFMM, n: &BigInt, context: BigIntFMMContext )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BigInt
impl RefUnwindSafe for BigInt
impl Send for BigInt
impl Sync for BigInt
impl Unpin for BigInt
impl UnwindSafe for BigInt
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more