Struct pumpkin::Prime
[−]
pub struct Prime(pub Int);
A cryptographically secure prime number.
Methods
impl Prime
[src]
fn new(bit_length: usize) -> Prime
Constructs a new Prime
with a size of bit_length
bits.
This will initialize an OsRng
instance and call the
Prime::from_rng()
method.
Note: the bit_length
MUST be at least 512-bits.
fn from_rng(bit_length: usize, rngesus: &mut OsRng) -> Prime
Constructs a new Prime
with the size of bit_length
bits, sourced
from an already-created OsRng
. Not that you can ONLY use an
OsRng
, as it uses the operating system's secure source of entropy.