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

Method canonical_summary_bytes

atomic-repository/src/git_binding/summary.rs:152–159  ·  view source on GitHub ↗

Canonical summary bytes: magic + deterministic encoding.

(&self)

Source from the content-addressed store, hash-verified

150
151 /// Canonical summary bytes: magic + deterministic encoding.
152 pub fn canonical_summary_bytes(&self) -> Result<Vec<u8>, BindingAttestationError> {
153 let encoded = postcard::to_allocvec(self)
154 .map_err(|error| BindingAttestationError::Encode(error.to_string()))?;
155 let mut bytes = Vec::with_capacity(ATTESTATION_SUMMARY_MAGIC.len() + encoded.len());
156 bytes.extend_from_slice(ATTESTATION_SUMMARY_MAGIC);
157 bytes.extend_from_slice(&encoded);
158 Ok(bytes)
159 }
160}
161
162/// A separately signed attestation summary (magic || summary || signature).

Callers 3

signMethod · 0.80
decodeMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by 1