From a2c032f2921bbd22a8acddbfeb6357cec7e1f607 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Thu, 17 Sep 2020 08:51:17 -0700 Subject: [PATCH] Add optional `std` feature to all crates (#217) Disabled-by-default. Closes #204. This mostly provides a `std::error::Error` impl on `aead::Error`. --- aes-gcm-siv/Cargo.toml | 1 + aes-gcm/Cargo.toml | 1 + aes-siv/Cargo.toml | 1 + ccm/Cargo.toml | 1 + chacha20poly1305/Cargo.toml | 1 + crypto_box/Cargo.toml | 1 + eax/Cargo.toml | 1 + mgm/Cargo.toml | 1 + xsalsa20poly1305/Cargo.toml | 1 + 9 files changed, 9 insertions(+) diff --git a/aes-gcm-siv/Cargo.toml b/aes-gcm-siv/Cargo.toml index fc275502..e7b5895f 100644 --- a/aes-gcm-siv/Cargo.toml +++ b/aes-gcm-siv/Cargo.toml @@ -27,6 +27,7 @@ zeroize = { version = "1", default-features = false } default = ["aes", "alloc"] alloc = ["aead/alloc"] heapless = ["aead/heapless"] +std = ["aead/std", "alloc"] [package.metadata.docs.rs] all-features = true diff --git a/aes-gcm/Cargo.toml b/aes-gcm/Cargo.toml index 2c7130ed..f32a1444 100644 --- a/aes-gcm/Cargo.toml +++ b/aes-gcm/Cargo.toml @@ -30,6 +30,7 @@ hex-literal = "0.2" default = ["aes", "alloc"] alloc = ["aead/alloc"] heapless = ["aead/heapless"] +std = ["aead/std", "alloc"] [package.metadata.docs.rs] all-features = true diff --git a/aes-siv/Cargo.toml b/aes-siv/Cargo.toml index f74f9494..dba85a31 100644 --- a/aes-siv/Cargo.toml +++ b/aes-siv/Cargo.toml @@ -33,6 +33,7 @@ hex-literal = "0.2" default = ["alloc"] alloc = ["aead/alloc"] heapless = ["aead/heapless"] +std = ["aead/std", "alloc"] [package.metadata.docs.rs] all-features = true diff --git a/ccm/Cargo.toml b/ccm/Cargo.toml index 66a774ea..81902b84 100644 --- a/ccm/Cargo.toml +++ b/ccm/Cargo.toml @@ -26,3 +26,4 @@ hex-literal = "0.2" default = ["alloc"] alloc = ["aead/alloc"] heapless = ["aead/heapless"] +std = ["aead/std", "alloc"] diff --git a/chacha20poly1305/Cargo.toml b/chacha20poly1305/Cargo.toml index ec7a1f28..386ca749 100644 --- a/chacha20poly1305/Cargo.toml +++ b/chacha20poly1305/Cargo.toml @@ -29,6 +29,7 @@ default = ["alloc", "chacha20", "xchacha20poly1305"] alloc = ["aead/alloc"] heapless = ["aead/heapless"] reduced-round = ["chacha20"] +std = ["aead/std", "alloc"] xchacha20poly1305 = ["chacha20/xchacha20"] [package.metadata.docs.rs] diff --git a/crypto_box/Cargo.toml b/crypto_box/Cargo.toml index 559f9544..434c223e 100644 --- a/crypto_box/Cargo.toml +++ b/crypto_box/Cargo.toml @@ -35,5 +35,6 @@ rand = "0.7" default = ["alloc", "u64_backend"] alloc = ["xsalsa20poly1305/alloc"] heapless = ["xsalsa20poly1305/heapless"] +std = ["xsalsa20poly1305/std"] u32_backend = ["x25519-dalek/u32_backend"] u64_backend = ["x25519-dalek/u64_backend"] diff --git a/eax/Cargo.toml b/eax/Cargo.toml index 14e997cd..e4ff06b3 100644 --- a/eax/Cargo.toml +++ b/eax/Cargo.toml @@ -33,6 +33,7 @@ aead = { version = "0.3", features = ["dev"], default-features = false } default = ["alloc"] alloc = ["aead/alloc"] heapless = ["aead/heapless"] +std = ["aead/std", "alloc"] [package.metadata.docs.rs] all-features = true diff --git a/mgm/Cargo.toml b/mgm/Cargo.toml index 7ecddeab..2373f096 100644 --- a/mgm/Cargo.toml +++ b/mgm/Cargo.toml @@ -26,3 +26,4 @@ hex-literal = "0.2" default = ["alloc"] alloc = ["aead/alloc"] heapless = ["aead/heapless"] +std = ["aead/std", "alloc"] diff --git a/xsalsa20poly1305/Cargo.toml b/xsalsa20poly1305/Cargo.toml index cbdb9fb3..b6c3ceb0 100644 --- a/xsalsa20poly1305/Cargo.toml +++ b/xsalsa20poly1305/Cargo.toml @@ -26,6 +26,7 @@ zeroize = { version = "1", default-features = false } default = ["alloc", "rand_core"] alloc = ["aead/alloc"] heapless = ["aead/heapless"] +std = ["aead/std", "alloc"] [package.metadata.docs.rs] all-features = true