Function xkcd_password::generate_password_from_words[][src]

pub fn generate_password_from_words<'a, I: IntoIterator<Item = &'a str>>(
    word_count: usize,
    dict: I
) -> String

Attempts to generate an xkcd-password given a words count and a custom dict.

Warning: This function doesn't protect against side-channel attacks.

Panics

Panics if any words contain space or newline characters, or if it appears more than once.

Panics if you ask for too many words.