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

Function test_verify_wrong_message

atomic-identity/src/keypair.rs:224–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222
223 #[test]
224 fn test_verify_wrong_message() {
225 let keypair = KeyPair::generate();
226 let message = b"Hello, Atomic!";
227 let wrong_message = b"Goodbye, Atomic!";
228
229 let signature = keypair.sign(message);
230 assert!(keypair.verify(wrong_message, &signature).is_err());
231 }
232
233 #[test]
234 fn test_public_key_base32_roundtrip() {

Callers

nothing calls this directly

Calls 1

signMethod · 0.45

Tested by

no test coverage detected