Skip to main content

public_key_hex

Function public_key_hex 

Source
pub fn public_key_hex(pk: &PublicKey) -> String
Expand description

Render a WireGuard public key as lowercase hex.

WireGuard’s own config files use base64, but hex is what the rest of this codebase uses for key identifiers, so we keep it consistent here. The 32-byte key becomes a 64-character string.