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

Function test_public_key_base32_roundtrip

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

Source from the content-addressed store, hash-verified

274
275 #[test]
276 fn test_public_key_base32_roundtrip() {
277 let keypair = KeyPair::generate();
278 let base32 = keypair.public.to_base32();
279 let recovered = PublicKey::from_base32(&base32).unwrap();
280 assert_eq!(keypair.public, recovered);
281 }
282
283 #[test]
284 fn test_public_key_serialization() {

Callers

nothing calls this directly

Calls 2

to_base32Method · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected