diff --git a/Cargo.lock b/Cargo.lock index dd4f055..fe739b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,7 +2,7 @@ name = "pumpkin" version = "0.1.0" dependencies = [ - "ramp 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ramp 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -31,7 +31,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "ramp" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gcc 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 076d4c3..8fe1d17 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" authors = ["Zach Dziura "] [dependencies] -ramp = "0.1.8" +ramp = "0.1.9" rand = "0.3.11" diff --git a/src/lib.rs b/src/lib.rs index 751da29..3b61826 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,37 @@ #![feature(core)] #![feature(test)] +/// # The Pumpkin Prime Number Generator +/// +/// The `pumpkin` prime number generator library can be used to generate +/// prime numbers of any reasonable length, suitable for any cryptographic +/// purpose. All numbers generated are seeded from the operating system's +/// secure source of entrophy and are verified using three different primality +/// tests. +/// +/// ## Installation +/// +/// To include `pumpkin` in your project add the following line to your +/// Cargo.toml file: +/// +/// ``` +/// [dependencies] +/// pumpkin = "*" +/// ``` +/// +/// ## Examples +/// +/// ``` +/// fn main() { +/// // Generate a 2048-bit prime number +/// let prime = pumpkin::Prime::new(2048); +/// +/// // Want to very the prime you generated is ACTUALLY prime, and not +/// // simply a probable prime? Easy! +/// assert_eq!(prime.verify(), true); +/// } +/// ``` + extern crate core; extern crate ramp; extern crate rand;