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:234–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

232
233 #[test]
234 fn test_public_key_base32_roundtrip() {
235 let keypair = KeyPair::generate();
236 let base32 = keypair.public.to_base32();
237 let recovered = PublicKey::from_base32(&base32).unwrap();
238 assert_eq!(keypair.public, recovered);
239 }
240
241 #[test]
242 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