mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +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]
|
||||
bincode = "1"
|
||||
criterion = "0.3.0"
|
||||
rand_core = { version = "0.6", default-features = false, features = ["getrandom"] }
|
||||
|
||||
[[bench]]
|
||||
name = "x25519"
|
||||
|
|
@ -55,5 +56,3 @@ serde = ["dep:serde", "curve25519-dalek/serde"]
|
|||
alloc = ["curve25519-dalek/alloc", "serde?/alloc", "zeroize?/alloc"]
|
||||
precomputed-tables = ["curve25519-dalek/precomputed-tables"]
|
||||
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
|
||||
//! `PublicKey::from()` to produce her secret and public keys:
|
||||
//!
|
||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
||||
//! ```rust
|
||||
//! use rand_core::OsRng;
|
||||
//! use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||
//!
|
||||
|
|
@ -64,8 +63,7 @@
|
|||
//!
|
||||
//! Bob does the same:
|
||||
//!
|
||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
||||
//! ```rust
|
||||
//! # use rand_core::OsRng;
|
||||
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||
//! let bob_secret = EphemeralSecret::new(OsRng);
|
||||
|
|
@ -76,8 +74,7 @@
|
|||
//! loudly meows `bob_public` back to Alice. Alice now computes her
|
||||
//! shared secret with Bob by doing:
|
||||
//!
|
||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
||||
//! ```rust
|
||||
//! # use rand_core::OsRng;
|
||||
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
||||
|
|
@ -89,8 +86,7 @@
|
|||
//!
|
||||
//! Similarly, Bob computes a shared secret by doing:
|
||||
//!
|
||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
||||
//! ```rust
|
||||
//! # use rand_core::OsRng;
|
||||
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
||||
|
|
@ -102,8 +98,7 @@
|
|||
//!
|
||||
//! These secrets are the same:
|
||||
//!
|
||||
#![cfg_attr(feature = "docsrs", doc = "```")]
|
||||
#![cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
||||
//! ```rust
|
||||
//! # use rand_core::OsRng;
|
||||
//! # use x25519_dalek::{EphemeralSecret, PublicKey};
|
||||
//! # let alice_secret = EphemeralSecret::new(OsRng);
|
||||
|
|
|
|||
|
|
@ -267,8 +267,7 @@ impl SharedSecret {
|
|||
/// cannot use the better, safer, and faster ephemeral DH API.
|
||||
///
|
||||
/// # Example
|
||||
#[cfg_attr(feature = "docsrs", doc = "```")]
|
||||
#[cfg_attr(not(feature = "docsrs"), doc = "```ignore")]
|
||||
/// ```rust
|
||||
/// use rand_core::OsRng;
|
||||
/// use rand_core::RngCore;
|
||||
///
|
||||
|
|
|
|||
Loading…
Reference in a new issue