Skip to main content

peer_id_to_xor_name

Function peer_id_to_xor_name 

Source
pub fn peer_id_to_xor_name(peer_id: &str) -> Option<[u8; 32]>
Expand description

Convert a hex-encoded peer ID string to an XorName.

Returns None if the string is not valid hex or is not exactly 32 bytes (64 hex chars).