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

Function test_sign_and_verify

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

Source from the content-addressed store, hash-verified

213
214 #[test]
215 fn test_sign_and_verify() {
216 let keypair = KeyPair::generate();
217 let message = b"Hello, Atomic!";
218
219 let signature = keypair.sign(message);
220 assert!(keypair.verify(message, &signature).is_ok());
221 }
222
223 #[test]
224 fn test_verify_wrong_message() {

Callers

nothing calls this directly

Calls 1

signMethod · 0.45

Tested by

no test coverage detected