SiriusStarr / elm-password-strength / Zxcvbn.MatchTypes

This module is not necessary for normal use of the Zxcvbn module; instead, it contains the types necessary for examining the actual matches in the most-guessable sequence contained in ZxcvbnResult.sequence.

Types


type alias ScoredMatch =
{ pattern : MatchDetails
, token : String
, i : Basics.Int
, j : Basics.Int
, guesses : Basics.Int
, guessesLog10 : Basics.Float 
}

Matches after estimated guesses have been calculated.


type MatchDetails
    = DictionaryMatch ({ dictionaryDetails : DictionaryDetails, dictionaryName : String, rank : Basics.Int, matchedWord : String })
    | SpatialMatch ({ graph : String, turns : Basics.Int, shiftedCount : Basics.Int })
    | SequenceMatch ({ sequenceName : String, sequenceSpace : Basics.Int, ascending : Basics.Bool })
    | RepeatMatch ({ baseToken : String, baseGuesses : Basics.Int, baseMatches : List ScoredMatch, repeatCount : Basics.Int })
    | RegexMatch ({ regexName : String, regexMatch : Regex.Match })
    | DateMatch ({ separator : String, year : Basics.Int, month : Basics.Int, day : Basics.Int })
    | BruteforceMatch

MatchDetails type for holding all of the fields only relevant to specific types of matches.


type DictionaryDetails
    = Dictionary
    | ReverseDictionary
    | L33tDictionary ({ sub : Dict Char Char, subDisplay : String })

DictionaryDetails for specifying which kind of dictionary match a specific match is and any other details (e.g. which substitutions were made for l33t matches).