The conflict-set identity: Blake3 over the domain-separated canonical bytes. This is the ` ` of the `atomic-conflict` projection header and the freshness check of every pack.
(&self)
| 314 | /// bytes. This is the `<conflict-set-hash>` of the `atomic-conflict` |
| 315 | /// projection header and the freshness check of every pack. |
| 316 | pub fn hash(&self) -> Result<Hash, ConflictObjectError> { |
| 317 | let bytes = self.canonical_bytes()?; |
| 318 | let mut hasher = blake3::Hasher::new(); |
| 319 | hasher.update(CONFLICT_SET_HASH_DOMAIN); |
| 320 | hasher.update(&bytes); |
| 321 | Ok(Hash::from_bytes(hasher.finalize().into())) |
| 322 | } |
| 323 | |
| 324 | /// Verify that `claimed` names exactly this object. |
| 325 | pub fn verify_hash(&self, claimed: &Hash) -> Result<(), ConflictObjectError> { |