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

Function test_sign_and_verify

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

Source from the content-addressed store, hash-verified

255
256 #[test]
257 fn test_sign_and_verify() {
258 let keypair = KeyPair::generate();
259 let message = b"Hello, Atomic!";
260
261 let signature = keypair.sign(message);
262 assert!(keypair.verify(message, &signature).is_ok());
263 }
264
265 #[test]
266 fn test_verify_wrong_message() {

Callers

nothing calls this directly

Calls 1

signMethod · 0.45

Tested by

no test coverage detected