[−][src]Function htpasswd::parse
pub fn parse(text: &str) -> HashMap<&str, &str>
Parse the htpasswd string and create a HashMap of user/password pairs.
Examples
let input = " johndoe:$apr1$hdqQY4oe$6PtEz0XH6ORg.GPKCTpG31 janedoe janedoe:$apr1$D7qCR.yD$vfKO/2urv89Okpxl8VGpb/ "; let mut output = HashMap::new(); output.insert("johndoe", "$apr1$hdqQY4oe$6PtEz0XH6ORg.GPKCTpG31"); output.insert("janedoe", "$apr1$D7qCR.yD$vfKO/2urv89Okpxl8VGpb/"); assert_eq!(output, parse(input));