()
| 176 | |
| 177 | #[test] |
| 178 | fn tampered_hash_fails() { |
| 179 | let (signing_key, seed) = test_keypair(); |
| 180 | let hash = Hash::of(b"original"); |
| 181 | let sig = sign_change("did:atomic:x", &seed, &hash, 0); |
| 182 | |
| 183 | let other = Hash::of(b"tampered"); |
| 184 | let public = signing_key.verifying_key().to_bytes(); |
| 185 | let err = verify_change_signature(&sig, &public, &other).unwrap_err(); |
| 186 | assert!(matches!(err, ChangeSignatureError::HashMismatch { .. })); |
| 187 | } |
| 188 | |
| 189 | #[test] |
| 190 | fn wrong_key_fails() { |
nothing calls this directly
no test coverage detected