MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / signing_data

Method signing_data

atomic-identity/src/delegation.rs:559–568  ·  view source on GitHub ↗

Get the data to be signed for this delegation.

(&self)

Source from the content-addressed store, hash-verified

557
558 /// Get the data to be signed for this delegation.
559 pub fn signing_data(&self) -> Vec<u8> {
560 let mut data = Vec::new();
561 data.extend_from_slice(self.delegator_id.as_bytes());
562 data.extend_from_slice(self.delegate_id.as_bytes());
563 data.extend_from_slice(&self.created_at.timestamp().to_le_bytes());
564 if let Some(exp) = self.expires_at {
565 data.extend_from_slice(&exp.timestamp().to_le_bytes());
566 }
567 data
568 }
569}
570
571impl fmt::Display for Delegation {

Callers

nothing calls this directly

Calls 3

to_le_bytesMethod · 0.80
as_bytesMethod · 0.45
timestampMethod · 0.45

Tested by

no test coverage detected