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

Method signature_input

atomic-core/src/change/attestation.rs:505–509  ·  view source on GitHub ↗

The canonical signature input: the attestation's JSON with `signature` cleared. JSON with struct field order is deterministic for this type, so the MAC binds exactly these bytes — every covered field, including `operations_covered`, `changes_covered` and the chain link.

(&self)

Source from the content-addressed store, hash-verified

503 /// so the MAC binds exactly these bytes — every covered field, including
504 /// `operations_covered`, `changes_covered` and the chain link.
505 fn signature_input(&self) -> Vec<u8> {
506 let mut unsigned = self.clone();
507 unsigned.signature = None;
508 serde_json::to_vec(&unsigned).expect("attestation canonical JSON")
509 }
510
511 /// Sign this attestation in place with the session MAC key (64 hex chars).
512 ///

Callers 2

sign_with_macMethod · 0.80
verify_macMethod · 0.80

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected