mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-07 20:30:39 +00:00
Remove redundant feature
This commit is contained in:
parent
fdc992d6cd
commit
f3c46bc3bf
3 changed files with 7 additions and 14 deletions
|
|
@ -43,6 +43,7 @@ zeroize = { version = "1", default-features = false, optional = true, features =
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bincode = "1"
|
bincode = "1"
|
||||||
criterion = "0.3.0"
|
criterion = "0.3.0"
|
||||||
|
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||||
|
|
||||||
[[bench]]
|
[[bench]]
|
||||||
name = "x25519"
|
name = "x25519"
|
||||||
|
|
@ -55,5 +56,3 @@ serde = ["dep:serde", "curve25519-dalek/serde"]
|
||||||
alloc = ["curve25519-dalek/alloc", "serde?/alloc", "zeroize?/alloc"]
|
alloc = ["curve25519-dalek/alloc", "serde?/alloc", "zeroize?/alloc"]
|
||||||
precomputed-tables = ["curve25519-dalek/precomputed-tables"]
|
precomputed-tables = ["curve25519-dalek/precomputed-tables"]
|
||||||
reusable_secrets = []
|
reusable_secrets = []
|
||||||
# docs: docsrs and doctest features
|
|
||||||
docsrs = ["rand_core/getrandom"]
|
|
||||||
|
|
|
||||||
15
src/lib.rs
15
src/lib.rs
|
|
@ -53,8 +53,7 @@
|
||||||
//! First, Alice uses `EphemeralSecret::new()` and then
|
//! First, Alice uses `EphemeralSecret::new()` and then
|
||||||
//! `PublicKey::from()` to produce her secret and public keys:
|
//! `PublicKey::from()` to produce her secret and public keys:
|
||||||
//!
|
//!
|
||||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
//! ```rust
|
||||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
|
||||||
//! use rand_core::OsRng;
|
//! use rand_core::OsRng;
|
||||||
//! use x25519_dalek::{EphemeralSecret, PublicKey};
|
//! use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||||
//!
|
//!
|
||||||
|
|
@ -64,8 +63,7 @@
|
||||||
//!
|
//!
|
||||||
//! Bob does the same:
|
//! Bob does the same:
|
||||||
//!
|
//!
|
||||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
//! ```rust
|
||||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
|
||||||
//! # use rand_core::OsRng;
|
//! # use rand_core::OsRng;
|
||||||
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||||
//! let bob_secret = EphemeralSecret::new(OsRng);
|
//! let bob_secret = EphemeralSecret::new(OsRng);
|
||||||
|
|
@ -76,8 +74,7 @@
|
||||||
//! loudly meows `bob_public` back to Alice. Alice now computes her
|
//! loudly meows `bob_public` back to Alice. Alice now computes her
|
||||||
//! shared secret with Bob by doing:
|
//! shared secret with Bob by doing:
|
||||||
//!
|
//!
|
||||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
//! ```rust
|
||||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
|
||||||
//! # use rand_core::OsRng;
|
//! # use rand_core::OsRng;
|
||||||
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||||
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
||||||
|
|
@ -89,8 +86,7 @@
|
||||||
//!
|
//!
|
||||||
//! Similarly, Bob computes a shared secret by doing:
|
//! Similarly, Bob computes a shared secret by doing:
|
||||||
//!
|
//!
|
||||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
//! ```rust
|
||||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
|
||||||
//! # use rand_core::OsRng;
|
//! # use rand_core::OsRng;
|
||||||
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||||
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
||||||
|
|
@ -102,8 +98,7 @@
|
||||||
//!
|
//!
|
||||||
//! These secrets are the same:
|
//! These secrets are the same:
|
||||||
//!
|
//!
|
||||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
//! ```rust
|
||||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
|
||||||
//! # use rand_core::OsRng;
|
//! # use rand_core::OsRng;
|
||||||
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||||
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
||||||
|
|
|
||||||
|
|
@ -267,8 +267,7 @@ impl SharedSecret {
|
||||||
/// cannot use the better, safer, and faster ephemeral DH API.
|
/// cannot use the better, safer, and faster ephemeral DH API.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
#[cfg_attr(feature = "docsrs", doc = "```")]
|
/// ```rust
|
||||||
#[cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
|
||||||
/// use rand_core::OsRng;
|
/// use rand_core::OsRng;
|
||||||
/// use rand_core::RngCore;
|
/// use rand_core::RngCore;
|
||||||
///
|
///
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue