MCPcopy Create free account
hub / github.com/cosdata/cosdata / get_current_timestamp

Function get_current_timestamp

org/src/session_token.rs:63–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61}
62
63fn get_current_timestamp() -> u64 {
64 SystemTime::now()
65 .duration_since(UNIX_EPOCH)
66 .unwrap()
67 .as_secs()
68}
69
70fn generate_token_key(master_key: &[u8], timestamp: u64) -> hmac::Key {
71 let key = hmac::Key::new(hmac::HMAC_SHA256, master_key);

Callers 2

create_sessionFunction · 0.70
verify_tokenFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected