Copyright | This file is part of the package zxcvbn-hs. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at: https://code.devalot.com/sthenauth/zxcvbn-hs No part of this package including this file may be copied modified propagated or distributed except according to the terms contained in the LICENSE file. |
---|---|
License | MIT |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data Config
- type Dictionary = HashMap Text Int
- addCustomFrequencyList :: Vector Text -> Config -> Config
- passwordLists :: HasConfig c => Lens' c [Dictionary]
- wordFrequencyLists :: HasConfig c => Lens' c [Dictionary]
- customFrequencyLists :: HasConfig c => Lens' c [Dictionary]
- keyboardGraphs :: HasConfig c => Lens' c [AdjacencyTable]
- obviousSequenceStart :: HasConfig c => Lens' c (Char -> Bool)
- class HasConfig c
Configuring word dictionaries, keyboards, etc.
A type to control which dictionaries, keyboard layouts, etc. will be used when estimating guesses.
Instances
Semigroup Config Source # | |
Monoid Config Source # | |
HasConfig Config Source # | |
Defined in Text.Password.Strength.Internal.Config |
addCustomFrequencyList :: Vector Text -> Config -> Config Source #
Add a custom list of words for frequency lookup. The words should be ordered from most frequent to least frequent.
Lenses for the Config
Type
passwordLists
: Leaked password frequency lists.wordFrequencyLists
: Various word frequency lists.customFrequencyLists
: Custom word frequency lists. Usually includes information about the person whose password we are guessing and the application for which we are running. An easier way to add words to this list is to use theaddCustomFrequencyList
function.keyboardGraphs
: Keyboard adjacency graphs.obviousSequenceStart
: Predicate function that should returnTrue
for characters that are "obvious first choices" to start a sequence. For example, in English,a
andA
would be consideredTrue
.
passwordLists :: HasConfig c => Lens' c [Dictionary] Source #
wordFrequencyLists :: HasConfig c => Lens' c [Dictionary] Source #
customFrequencyLists :: HasConfig c => Lens' c [Dictionary] Source #
keyboardGraphs :: HasConfig c => Lens' c [AdjacencyTable] Source #
config
Instances
HasConfig Config Source # | |
Defined in Text.Password.Strength.Internal.Config |