• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //! Local types that are equivalent to those generated for the SecureClock HAL interface
2 
3 use crate::{cbor_type_error, AsCborValue, CborError};
4 use alloc::{
5     format,
6     string::{String, ToString},
7     vec::Vec,
8 };
9 use kmr_derive::AsCborValue;
10 
11 pub const TIME_STAMP_MAC_LABEL: &[u8] = b"Auth Verification";
12 
13 #[derive(Debug, Clone, Eq, Hash, PartialEq, AsCborValue)]
14 pub struct TimeStampToken {
15     pub challenge: i64,
16     pub timestamp: Timestamp,
17     pub mac: Vec<u8>,
18 }
19 
20 #[derive(Debug, Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd, AsCborValue)]
21 pub struct Timestamp {
22     pub milliseconds: i64,
23 }
24