Skip to main content

extract_key_material

Function extract_key_material 

Source
pub fn extract_key_material(profile_xml: &str) -> Option<&str>
Expand description

Extract the <keyMaterial> hex text from a WLAN profile XML, if present.

A minimal, robust scan for the first <keyMaterial>...</keyMaterial> element (the profile schema has exactly one). Returns None when the tag is absent (e.g. an open network with no key). Whitespace around the value is trimmed.