Skip to content

Commit 8867a02

Browse files
committed
Bump aead to v0.6.0-rc.3; restore getrandom features
This release drops the dependency on `rand_core` when using `getrandom`, which was the original feature name for this functionality, and in doing so also avoids a breaking change. It also updates `rand_core` to the v0.10 prereleases. Dependencies which depend on `rand_core` v0.10 prereleases have also been bumped to ensure we don't pull in old versions.
1 parent a20063f commit 8867a02

File tree

24 files changed

+165
-153
lines changed

24 files changed

+165
-153
lines changed

Cargo.lock

Lines changed: 39 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,3 @@ members = [
1818
[patch.crates-io]
1919
aead-stream = { path = "aead-stream" }
2020
aes-gcm = { path = "aes-gcm" }
21-
22-
# https://github.com/RustCrypto/traits/pull/2019
23-
aead = { git = "https://github.com/RustCrypto/traits.git" }
24-
crypto-common = { git = "https://github.com/RustCrypto/traits.git" }

aead-stream/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ categories = ["cryptography", "no-std"]
1313
rust-version = "1.85"
1414

1515
[dependencies]
16-
aead = { version = "0.6.0-rc.2", default-features = false }
16+
aead = { version = "0.6.0-rc.3", default-features = false }
1717

1818
[features]
1919
alloc = ["aead/alloc"]

aes-gcm-siv/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@ categories = ["cryptography", "no-std"]
1717
rust-version = "1.85"
1818

1919
[dependencies]
20-
aead = { version = "0.6.0-rc.2", default-features = false }
21-
aes = { version = "0.9.0-rc.1", optional = true }
22-
cipher = "0.5.0-rc.1"
23-
ctr = "0.10.0-rc.1"
24-
polyval = { version = "0.7.0-rc.2", default-features = false }
20+
aead = { version = "0.6.0-rc.3", default-features = false }
21+
aes = { version = "0.9.0-rc.2", optional = true }
22+
cipher = "0.5.0-rc.2"
23+
ctr = "0.10.0-rc.2"
24+
polyval = { version = "0.7.0-rc.3", default-features = false }
2525
subtle = { version = "2", default-features = false }
2626
zeroize = { version = "1", optional = true, default-features = false }
2727

2828
[dev-dependencies]
29-
aead = { version = "0.6.0-rc.2", features = ["dev"], default-features = false }
29+
aead = { version = "0.6.0-rc.3", features = ["dev"], default-features = false }
3030

3131
[features]
32-
default = ["aes", "alloc", "os_rng"]
32+
default = ["aes", "alloc", "getrandom"]
3333
alloc = ["aead/alloc"]
3434
arrayvec = ["aead/arrayvec"]
3535
bytes = ["aead/bytes"]
36-
os_rng = ["aead/os_rng", "rand_core"]
36+
getrandom = ["aead/getrandom"]
3737
rand_core = ["aead/rand_core"]
3838

3939
[package.metadata.docs.rs]

aes-gcm-siv/src/lib.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
//!
1212
//! Simple usage (allocating, no associated data):
1313
//!
14-
#![cfg_attr(feature = "os_rng", doc = "```")]
15-
#![cfg_attr(not(feature = "os_rng"), doc = "```ignore")]
14+
#![cfg_attr(feature = "getrandom", doc = "```")]
15+
#![cfg_attr(not(feature = "getrandom"), doc = "```ignore")]
1616
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
1717
//! use aes_gcm_siv::{
1818
//! aead::{Aead, AeadCore, KeyInit, rand_core::OsRng},
@@ -47,8 +47,11 @@
4747
//! It can then be passed as the `buffer` parameter to the in-place encrypt
4848
//! and decrypt methods:
4949
//!
50-
#![cfg_attr(all(feature = "os_rng", feature = "arrayvec"), doc = "```")]
51-
#![cfg_attr(not(all(feature = "os_rng", feature = "arrayvec")), doc = "```ignore")]
50+
#![cfg_attr(all(feature = "getrandom", feature = "arrayvec"), doc = "```")]
51+
#![cfg_attr(
52+
not(all(feature = "getrandom", feature = "arrayvec")),
53+
doc = "```ignore"
54+
)]
5255
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
5356
//! use aes_gcm_siv::{
5457
//! aead::{AeadInOut, Buffer, KeyInit, rand_core::OsRng, arrayvec::ArrayVec},

aes-gcm/Cargo.toml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,27 @@ categories = ["cryptography", "no-std"]
1717
rust-version = "1.85"
1818

1919
[dependencies]
20-
aead = { version = "0.6.0-rc.2", default-features = false }
21-
aes = { version = "0.9.0-rc.1", optional = true }
22-
cipher = "0.5.0-rc.1"
23-
ctr = "0.10.0-rc.1"
24-
ghash = { version = "0.6.0-rc.2", default-features = false }
20+
aead = { version = "0.6.0-rc.3", default-features = false }
21+
cipher = "0.5.0-rc.2"
22+
ctr = "0.10.0-rc.2"
23+
ghash = { version = "0.6.0-rc.3", default-features = false }
2524
subtle = { version = "2", default-features = false }
25+
26+
# optional dependencies
27+
aes = { version = "0.9.0-rc.2", optional = true }
2628
zeroize = { version = "1", optional = true, default-features = false }
2729

2830
[dev-dependencies]
29-
aead = { version = "0.6.0-rc.2", features = ["alloc", "dev"], default-features = false }
31+
aead = { version = "0.6.0-rc.3", features = ["alloc", "dev"], default-features = false }
3032
hex-literal = "1"
3133

3234
[features]
33-
default = ["aes", "alloc", "os_rng"]
35+
default = ["aes", "alloc", "getrandom"]
3436
alloc = ["aead/alloc"]
37+
3538
arrayvec = ["aead/arrayvec"]
3639
bytes = ["aead/bytes"]
37-
os_rng = ["aead/os_rng", "rand_core"]
40+
getrandom = ["aead/getrandom"]
3841
rand_core = ["aead/rand_core"]
3942

4043
[package.metadata.docs.rs]

aes-gcm/src/lib.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
//!
1313
//! Simple usage (allocating, no associated data):
1414
//!
15-
#![cfg_attr(feature = "os_rng", doc = "```")]
16-
#![cfg_attr(not(feature = "os_rng"), doc = "```ignore")]
15+
#![cfg_attr(feature = "getrandom", doc = "```")]
16+
#![cfg_attr(not(feature = "getrandom"), doc = "```ignore")]
1717
//! use aes_gcm::{
1818
//! aead::{Aead, AeadCore, KeyInit, rand_core::OsRng},
1919
//! Aes256Gcm, Nonce, Key // Or `Aes128Gcm`
2020
//! };
2121
//!
2222
//! # fn gen_key() -> Result<(), core::array::TryFromSliceError> {
2323
//! // The encryption key can be generated randomly:
24-
//! # #[cfg(feature = "os_rng")] {
24+
//! # #[cfg(feature = "getrandom")] {
2525
//! let key = Aes256Gcm::generate_key().expect("generate key");
2626
//! # }
2727
//!
@@ -67,8 +67,11 @@
6767
//! It can then be passed as the `buffer` parameter to the in-place encrypt
6868
//! and decrypt methods:
6969
//!
70-
#![cfg_attr(all(feature = "os_rng", feature = "arrayvec"), doc = "```")]
71-
#![cfg_attr(not(all(feature = "os_rng", feature = "arrayvec")), doc = "```ignore")]
70+
#![cfg_attr(all(feature = "getrandom", feature = "arrayvec"), doc = "```")]
71+
#![cfg_attr(
72+
not(all(feature = "getrandom", feature = "arrayvec")),
73+
doc = "```ignore"
74+
)]
7275
//! # fn main() -> Result<(), Box<dyn core::error::Error>> {
7376
//! use aes_gcm::{
7477
//! aead::{AeadCore, AeadInOut, KeyInit, rand_core::OsRng, arrayvec::ArrayVec},

0 commit comments

Comments
 (0)