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

Function test_verify_wrong_message

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

Source from the content-addressed store, hash-verified

264
265 #[test]
266 fn test_verify_wrong_message() {
267 let keypair = KeyPair::generate();
268 let message = b"Hello, Atomic!";
269 let wrong_message = b"Goodbye, Atomic!";
270
271 let signature = keypair.sign(message);
272 assert!(keypair.verify(wrong_message, &signature).is_err());
273 }
274
275 #[test]
276 fn test_public_key_base32_roundtrip() {

Callers

nothing calls this directly

Calls 1

signMethod · 0.45

Tested by

no test coverage detected