pub enum TimePrecision {
Hour,
Quarter,
Minute,
}Expand description
The granularity at which the time value is quantised when constructing the KDF input string.
Coarser precision yields a longer validity window, making it easier for a legitimate user to produce the correct key; finer precision increases the cost of time-sweeping attacks.
Variants§
Hour
Quantise to the current hour.
Input example: "14" (24-hour) | "02PM" (12-hour).
The derived key is valid for the entire 60-minute block.
Quarter
Quantise to the current 15-minute block (minute snapped to 00, 15, 30, or 45).
Input example: "14:30" (24-hour) | "02:30PM" (12-hour).
The derived key is valid for the 15-minute interval enclosing the
chosen minute.
Minute
Quantise to the current minute (1-minute validity window).
Input example: "14:37" (24-hour) | "02:37PM" (12-hour).
The strongest temporal constraint available — both parties’ clocks must
be NTP-synchronised to within ±30 seconds.
Trait Implementations§
Source§impl Clone for TimePrecision
impl Clone for TimePrecision
Source§fn clone(&self) -> TimePrecision
fn clone(&self) -> TimePrecision
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TimePrecision
impl Debug for TimePrecision
Source§impl PartialEq for TimePrecision
impl PartialEq for TimePrecision
impl Copy for TimePrecision
impl Eq for TimePrecision
impl StructuralPartialEq for TimePrecision
Auto Trait Implementations§
impl Freeze for TimePrecision
impl RefUnwindSafe for TimePrecision
impl Send for TimePrecision
impl Sync for TimePrecision
impl Unpin for TimePrecision
impl UnsafeUnpin for TimePrecision
impl UnwindSafe for TimePrecision
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.