Added rustdoc for lib file
This commit is contained in:
parent
c4c7a07218
commit
b901d7962b
3 changed files with 34 additions and 3 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -2,7 +2,7 @@
|
||||||
name = "pumpkin"
|
name = "pumpkin"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
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)",
|
"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]]
|
[[package]]
|
||||||
name = "ramp"
|
name = "ramp"
|
||||||
version = "0.1.8"
|
version = "0.1.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gcc 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
"gcc 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -4,5 +4,5 @@ version = "0.1.0"
|
||||||
authors = ["Zach Dziura <zcdziura@gmail.com>"]
|
authors = ["Zach Dziura <zcdziura@gmail.com>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ramp = "0.1.8"
|
ramp = "0.1.9"
|
||||||
rand = "0.3.11"
|
rand = "0.3.11"
|
||||||
|
|
31
src/lib.rs
31
src/lib.rs
|
@ -2,6 +2,37 @@
|
||||||
#![feature(core)]
|
#![feature(core)]
|
||||||
#![feature(test)]
|
#![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 core;
|
||||||
extern crate ramp;
|
extern crate ramp;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
Loading…
Add table
Reference in a new issue