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 | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Config
- type Dictionary = HashMap Text Int
- addCustomFrequencyList :: Vector Text -> Config -> Config
- class HasConfig c where
- config :: Lens' c Config
- customFrequencyLists :: Lens' c [Dictionary]
- keyboardGraphs :: Lens' c [AdjacencyTable]
- obviousSequenceStart :: Lens' c (Char -> Bool)
- passwordLists :: Lens' c [Dictionary]
- wordFrequencyLists :: Lens' c [Dictionary]
Configuring word dictionaries, keyboards, etc.
A type to control which dictionaries, keyboard layouts, etc. will be used when estimating guesses.
Instances
Monoid Config Source # | |
Semigroup 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
.
class HasConfig c where Source #
config :: Lens' c Config Source #
customFrequencyLists :: Lens' c [Dictionary] Source #
keyboardGraphs :: Lens' c [AdjacencyTable] Source #
obviousSequenceStart :: Lens' c (Char -> Bool) Source #
passwordLists :: Lens' c [Dictionary] Source #
wordFrequencyLists :: Lens' c [Dictionary] Source #
Instances
HasConfig Config Source # | |
Defined in Text.Password.Strength.Internal.Config |