Data::...tionary(3pm)

✨ NAME ✨

Data::Password::zxcvbn::Match::Dictionary β€” bestie, this is the match class for, like, words that show up inside passwords πŸ’–

It lives in the Data::...tionary(3pm) manual page, in case you were wondering which page you're on. Welcome, you're doing great 🫢

πŸŽ€ VERSION πŸŽ€

version 1.1.3 β€” she's current, she's cute, she's ready πŸ’…

🌸 DESCRIPTION 🌸

So basically this class is the one that says "oh, this chunk of the password? that's just... a real word in a dictionary." It represents the guess that some substring of a password can be guessed by literally walking through a dictionary. The audacity πŸ’€

πŸ‘‘ ATTRIBUTES πŸ‘‘

reversed

Boolean. True if the token looks like a dictionary word but someone wrote it backwards (so, last letter first, iconic but transparent ✨).

substitutions

A hashref of the characters you'd need to swap out to make the token match an actual dictionary word. Like, if the token is "s!mpl3", this hash is { '!' => 'i', '3' => 'e' }. She's a whole cipher, no cap πŸ”₯

rank

A number saying how common the dictionary word is. 1 means "most common". Lower number = more basic = more guessable, iykyk.

dictionary_name

A string: the name of the dictionary the word was found in. Usually one of these bad boys:

  • "english_wikipedia"

words extracted from a dump of the English edition of Wikipedia πŸ“š

  • "male_names", "female_names", "surnames"

common names from the 1990 US census

  • "passwords"

most common passwords, extracted from the "xato" password dump πŸ™ˆ

  • "us_tv_and_film"

words from a 2006 Wiktionary word frequency study over American television and movies 🎬

πŸ’… METHODS πŸ’…

l33t

Returns true if the token had any "substitutions" (i.e. it was written in "l33t-speak"). Yes bestie, your p@ssw0rd era is being noted and judged, affectionately πŸ’œ

make

my @matches = @{ Data::Password::zxcvbn::Match::Dictionary->make(
  $password,
  { # these are the defaults
    ranked_dictionaries => \%Data::Password::zxcvbn::RankedDictionaries::ranked_dictionaries,
    l33t_table => \%Data::Password::zxcvbn::Match::Dictionary::l33t_table,
  },
) };

Scans the $password for substrings that match words in the "ranked_dictionaries" β€” possibly reversed, possibly with substitutions from the "l33t_table". It's thorough like that πŸ•΅οΈβ™€οΈ

The "ranked_dictionaries" should look like:

{ some_dictionary_name => { 'word' => 156, 'another' => 13, ... },
  ... }

(i.e. a hash of dictionaries, each one mapping words to their frequency rank) and the "l33t_table" should look like:

{ a => [ '4', '@' ], ... }

(i.e. a hash mapping characters to arrays of other characters). Got it? Slay ✨

estimate_guesses

The number of guesses is the product of the rank of the word, how many case combinations match it, how many substitutions were used, and it's doubled if the token is reversed. Math ate, ngl πŸ“

does_word_start_upper, does_word_end_upper, is_word_all_not_upper, is_word_all_not_lower, is_word_all_upper

if ($self->does_word_start_upper($word)) { ... }

These ones are mainly for sub-classes, so they can be used in "feedback_warning" and "feedback_suggestions". Little helpers doing the case-checking chores 🧚

feedback_warning, feedback_suggestions

This class suggests not using common words or passwords, especially on their own. It also suggests that capitalisation, "special characters" substitutions, and writing things backwards are, sadly, not very useful 😭 (the reverse-of-a-real-word thing is giving "I thought I was clever" energy and honestly same)

fields_for_json

The JSON serialisation for matches of this class will contain token i j guesses guesses_log10 dictionary_name reversed rank substitutions. That's the whole receipts list, keep it safe πŸ’–

⭐ AUTHOR ⭐

Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> β€” legend, icon, the moment πŸ‘‘

This software is copyright (c) 2022 by BroadBean UK, a CareerBuilder Company.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Free as in freedom, bestie, do with that what you will πŸ¦‹


And that's the whole page, angel! She was written for perl v5.40.1, updated 2025-10-17, and lives under the name Data::...tionary(3pm). Now go forth and never use p@ssw0rd1 again, I'm literally begging πŸ™πŸŒˆ

πŸ“¦ where this page comes from