Options class

Options.

Constructors

Options.new({List<BaseMatcher> matchers = const <BaseMatcher>[], Set<Dictionaries> dictionaries = const <Dictionaries>{}, L33tTable l33tTable = common.l33tTable, Graph graph = adjacencyGraph, bool useLevenshteinDistance = false, int levenshteinThreshold = 2, int l33tMaxSubstitutions = 100, int maxLength = 256})
Creates a new instance.

Properties

currentYear int
The current year used to calculate date guesses.
final
dictionaries Set<Dictionaries>
Define dictionary that should be used to check against. The matcher will search the dictionaries for similar password with l33t speak and reversed words.
final
graph Graph
Defines keyboard layouts as an object which are used to find sequences.
final
hashCode int
The hash code for this object.
no setterinherited
l33tMaxSubstitutions int
The l33t matcher will check how many characters can be exchanged with the l33t table. If they are to many it will decrease the calcTime significantly. So we cap it at a reasonable value by default which will probably already seems like a strong password anyway. Default is 100.
final
l33tTable L33tTable
Define an object with l33t substitutions. For example that an "a" can be exchanged with a "4" or a "@".
final
levenshteinThreshold int
Defines how many characters can be different to match a dictionary word with the levenshtein algorithm. Default is 2.
final
matchers List<BaseMatcher>
Additional matchers.
final
maxLength int
Defines how many character of the password are checked. A password longer than the default are considered strong anyway, but it can be increased as pleased. Be aware that this could open some attack vectors. Default is 256.
final
minYearSpace int
The minimum number of years used to calculate date guesses.
no setter
rankedDictionaries RankedDictionaries
Ranks of words by dictionary type.
no setter
rankedDictionariesMaxWordSize Map<Dictionary, int>
Maximum word length by dictionary type.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trieNodeRoot → TrieNode
A tree of l33t substitutions.
no setter
useLevenshteinDistance bool
Defines if the levenshtein algorithm should be used. This will be only used on the complete password and not on parts of it. This will decrease the calcTime a bit but will significantly improve the password check. Default is false.
final

Methods

copyWith({List<BaseMatcher>? matchers, Set<Dictionaries>? dictionaries, List<String>? userInputs, L33tTable? l33tTable, Graph? graph, bool? useLevenshteinDistance, int? levenshteinThreshold, int? l33tMaxSubstitutions, int? maxLength}) Options
Creates a new instance with updated values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited