From 1e4a875d8f8da5ebe7a97da7a690e37f8a403147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Thu, 15 Feb 2024 11:09:22 +0100 Subject: [PATCH] Prevent the crate to be used by accident --- Cargo.toml | 2 +- src/lib.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 310a9cc..b6645b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["cryptography"] [features] default = [] -hazardous-materials = [] +i-understand-and-accept-the-risks = [] [dependencies] base64ct = { version = "1.6.0", default-features = false, features = ["std"] } diff --git a/src/lib.rs b/src/lib.rs index 4d07c03..af1c211 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,3 +8,6 @@ pub use scheme::Scheme; const DEFAULT_IKM_DURATION: u64 = 60 * 60 * 24 * 365; // In seconds const DEFAULT_SCHEME: Scheme = Scheme::XChaCha20Poly1305WithBlake3; + +#[cfg(not(feature = "i-understand-and-accept-the-risks"))] +compile_error!("This crate is experimental and therefore comes with absolutely no security guaranty. To use it anyway, enable the \"i-understand-and-accept-the-risks\" feature.");