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

Function test_public_key_serialization

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

Source from the content-addressed store, hash-verified

282
283 #[test]
284 fn test_public_key_serialization() {
285 let keypair = KeyPair::generate();
286 let json = serde_json::to_string(&keypair.public).unwrap();
287 let parsed: PublicKey = serde_json::from_str(&json).unwrap();
288 assert_eq!(keypair.public, parsed);
289 }
290
291 #[test]
292 fn test_secret_key_from_bytes() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected