MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / verify_signer

Method verify_signer

atomic-identity/src/signing.rs:260–271  ·  view source on GitHub ↗

Verify this signature against a message and ensure the signer matches.

(
        &self,
        message: &[u8],
        expected_signer: &IdentityId,
    )

Source from the content-addressed store, hash-verified

258
259 /// Verify this signature against a message and ensure the signer matches.
260 pub fn verify_signer(
261 &self,
262 message: &[u8],
263 expected_signer: &IdentityId,
264 ) -> Result<(), IdentityError> {
265 if self.signer_id != *expected_signer {
266 return Err(IdentityError::VerificationFailed(
267 "Signer does not match expected identity".to_string(),
268 ));
269 }
270 self.verify(message)
271 }
272}
273
274impl fmt::Display for SignatureInfo {

Callers

nothing calls this directly

Calls 1

verifyMethod · 0.45

Tested by

no test coverage detected