Check whether a byte slice looks like an attestation file. Fast check — only inspects the 4-byte magic prefix.
(data: &[u8])
| 495 | /// |
| 496 | /// Fast check — only inspects the 4-byte magic prefix. |
| 497 | pub fn is_attestation(data: &[u8]) -> bool { |
| 498 | data.len() >= MAGIC.len() && &data[..4] == MAGIC |
| 499 | } |
| 500 | |
| 501 | /// The canonical signature input: the attestation's JSON with `signature` |
| 502 | /// cleared. JSON with struct field order is deterministic for this type, |