[−][src]Struct ramp_primes::Generator
Implementations
impl Generator
[src]
pub fn new_composite(n: usize) -> Int
[src]
Generates a composite number
pub fn new_uint(n: usize) -> Int
[src]
Large Unsigned Integer Generator
This function takes as input n, the bit-length specified for the integer.
Example
use ramp_primes::Generator; fn main(){ // Outputs a Large Integer with 1024 bits let large_uint = Generator::new_uint(1024); }
pub fn new_prime(n: usize) -> Int
[src]
Large Prime Generator
This function takes as input n, the bit-length specified for the prime number.
Example
use ramp_primes::Generator; fn main(){ // Outputs a Large Prime with 512 bits let p = Generator::new_prime(512); let q = Generator::new_prime(512); // Multiplies p times q and returns the product let n = p * q; }
pub fn new_safe_prime(n: usize) -> Int
[src]
Safe Prime Generator
This function takes as input n, the bit-length specified for the safe prime number. This function is slower than prime number generation itself.
Example
use ramp_primes::Generator; fn main(){ // Outputs a Large Prime with 64 bits let p = Generator::safe_prime(64); }
pub fn new_safe_prime_experimental(n: usize) -> Int
[src]
This function adds a 2x speed boost to safe prime generation but also may return an Int
that is not of the specified size
Auto Trait Implementations
impl RefUnwindSafe for Generator
impl Send for Generator
impl Sync for Generator
impl Unpin for Generator
impl UnwindSafe for Generator
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, 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>,