Skip to main content

sanitize_host_hint

Function sanitize_host_hint 

Source
pub fn sanitize_host_hint(hostname: &str) -> String
Expand description

A hostname as a host hint: lowercased, anything outside [a-z0-9.-] replaced by -, cut to 48 chars; unknown if nothing is left. The receiver validates the same alphabet (jekt_sign::is_valid_wan_host_hint) and renders anything else as ?.