Prevent the crate to be used by accident

This commit is contained in:
Rodolphe Bréard 2024-02-15 11:09:22 +01:00
parent b99746bd65
commit 1e4a875d8f
2 changed files with 4 additions and 1 deletions

View file

@ -13,7 +13,7 @@ categories = ["cryptography"]
[features] [features]
default = [] default = []
hazardous-materials = [] i-understand-and-accept-the-risks = []
[dependencies] [dependencies]
base64ct = { version = "1.6.0", default-features = false, features = ["std"] } base64ct = { version = "1.6.0", default-features = false, features = ["std"] }

View file

@ -8,3 +8,6 @@ pub use scheme::Scheme;
const DEFAULT_IKM_DURATION: u64 = 60 * 60 * 24 * 365; // In seconds const DEFAULT_IKM_DURATION: u64 = 60 * 60 * 24 * 365; // In seconds
const DEFAULT_SCHEME: Scheme = Scheme::XChaCha20Poly1305WithBlake3; 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.");