Verify the MAC. Any edited field — including a swapped capture from another session or turn — fails.
(&self, key_hex: &str)
| 173 | /// Verify the MAC. Any edited field — including a swapped capture from |
| 174 | /// another session or turn — fails. |
| 175 | pub fn verify(&self, key_hex: &str) -> bool { |
| 176 | let input = self.mac_input(); |
| 177 | Self::mac(key_hex, &input) == self.mac |
| 178 | } |
| 179 | |
| 180 | /// Encode for durable storage (one JSON document per file). |
| 181 | pub fn to_json(&self) -> AgentResult<Vec<u8>> { |