Does this DID correspond to the given public key? Accepts either the in-tree `did:atomic` fingerprint or the standard `did:key` form.
(did: &str, public_key: &PublicKey)
| 58 | /// Does this DID correspond to the given public key? Accepts either the |
| 59 | /// in-tree `did:atomic` fingerprint or the standard `did:key` form. |
| 60 | pub fn did_matches_public_key(did: &str, public_key: &PublicKey) -> bool { |
| 61 | did == did_for_public_key(public_key) || did == did_key_for_public_key(public_key) |
| 62 | } |
| 63 | |
| 64 | #[cfg(test)] |
| 65 | mod tests { |
no test coverage detected