From af2c83f934e370bc3408778aec6d8fb043431fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 7 Apr 2024 22:17:01 +0200 Subject: [PATCH] Set DEFAULT_SCHEME public --- src/ikm.rs | 7 ++++--- src/lib.rs | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ikm.rs b/src/ikm.rs index 12c3b8d..9921cfc 100644 --- a/src/ikm.rs +++ b/src/ikm.rs @@ -195,9 +195,10 @@ impl InputKeyMaterialList { Self::default() } - /// Add a new IKM to the list. The `not_before` field will be set to the current timestamp and - /// the `not_after` will be set to the current timestamp plus the value of - /// [DEFAULT_IKM_DURATION][crate::DEFAULT_IKM_DURATION]. + /// Add a new IKM to the list. The scheme will be set to the value of + /// [DEFAULT_SCHEME][crate::DEFAULT_SCHEME], the `not_before` field will be set to the current + /// timestamp and the `not_after` will be set to the current timestamp incremented with the + /// value of [DEFAULT_IKM_DURATION][crate::DEFAULT_IKM_DURATION]. /// /// # Examples /// diff --git a/src/lib.rs b/src/lib.rs index d4573b2..46a9d73 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -45,6 +45,6 @@ pub const DEFAULT_IKM_DURATION: u64 = 315_569_252; /// [tropical_year]: https://en.wikipedia.org/wiki/Tropical_year #[cfg(feature = "encryption")] pub const DEFAULT_KEY_CTX_PERIODICITY: u64 = 31_556_925; -/// Default scheme used when adding a new IKM. +/// Default scheme used when adding a new IKM. The value is `XChaCha20Poly1305WithBlake3`. #[cfg(feature = "ikm-management")] -const DEFAULT_SCHEME: Scheme = Scheme::XChaCha20Poly1305WithBlake3; +pub const DEFAULT_SCHEME: Scheme = Scheme::XChaCha20Poly1305WithBlake3;