pub enum TimePrecision {
Hour,
Quarter,
Minute,
}Expand description
How finely time is quantized when constructing the KDF input string.
Coarser precision gives a longer validity window (easier for the legitimate user to hit); finer precision raises the cost of time-sweeping attacks.
Variants§
Hour
Quantize to the current hour.
Input example: "14" (24 h) | "02PM" (12 h)
Valid for the entire 60-minute block.
Quarter
Quantize to the current 15-minute block (minute snapped to 00, 15, 30, or 45).
Input example: "14:30" (24 h) | "02:30PM" (12 h)
Valid for the 15-minute interval containing the chosen minute.
Minute
Quantize to the current minute (1-minute window).
Input example: "14:37" (24 h) | "02:37PM" (12 h)
Strongest temporal constraint — ensure both parties’ clocks are NTP
synchronised to within ±30 s.
Trait Implementations§
Source§impl Clone for TimePrecision
impl Clone for TimePrecision
Source§fn clone(&self) -> TimePrecision
fn clone(&self) -> TimePrecision
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.