From e735198f6a866f5173fdf5f7d986ab4bfc8c179f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 9 Mar 2024 11:50:27 +0100 Subject: [PATCH] Allow to set the key context periodicity --- src/kdf.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/kdf.rs b/src/kdf.rs index f5f92a6..376e0f1 100644 --- a/src/kdf.rs +++ b/src/kdf.rs @@ -9,6 +9,10 @@ pub struct KeyContext { } impl KeyContext { + pub fn set_periodicity(&mut self, periodicity: u64) { + self.periodicity = Some(periodicity); + } + pub(crate) fn get_value(&self, time_period: Option) -> Vec> { let mut ret: Vec> = self.ctx.iter().map(|s| s.as_bytes().to_vec()).collect(); if let Some(tp) = time_period {