Expose the IKM

This commit is contained in:
Rodolphe Bréard 2024-02-25 18:08:00 +01:00
parent 6ceb598c04
commit 395703dae4
2 changed files with 8 additions and 8 deletions

View file

@ -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 {

View file

@ -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;