From 395703dae443757379f7c8bdee204a566111bee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 25 Feb 2024 18:08:00 +0100 Subject: [PATCH] Expose the IKM --- src/ikm.rs | 14 +++++++------- src/lib.rs | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ikm.rs b/src/ikm.rs index 05ccce1..8584257 100644 --- a/src/ikm.rs +++ b/src/ikm.rs @@ -7,16 +7,16 @@ const IKM_STRUCT_SIZE: usize = 57; const IKM_CONTENT_SIZE: usize = 32; pub(crate) type CounterId = u32; -pub(crate) type IkmId = u32; +pub type IkmId = u32; #[derive(Debug)] -pub(crate) struct InputKeyMaterial { - pub(crate) id: IkmId, - pub(crate) scheme: Scheme, +pub struct InputKeyMaterial { + pub id: IkmId, + pub scheme: Scheme, pub(crate) content: [u8; IKM_CONTENT_SIZE], - pub(crate) created_at: SystemTime, - pub(crate) expire_at: SystemTime, - pub(crate) is_revoked: bool, + pub created_at: SystemTime, + pub expire_at: SystemTime, + pub is_revoked: bool, } impl InputKeyMaterial { diff --git a/src/lib.rs b/src/lib.rs index 69bd7b1..5fd09af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,7 @@ mod storage; pub use encryption::{decrypt, encrypt}; pub use error::Error; #[cfg(any(feature = "encryption", feature = "ikm-management"))] -pub use ikm::InputKeyMaterialList; +pub use ikm::{InputKeyMaterialList, InputKeyMaterial, IkmId}; #[cfg(any(feature = "encryption", feature = "ikm-management"))] pub use scheme::Scheme;