wordpass-1.0.0.10: Dictionary-based password generator

Safe HaskellNone
LanguageHaskell2010

Text.WordPass

Contents

Description

Main module generating passwords.

Synopsis

Documentation

type WordSet = Set Text Source #

Explanatory type alias for the type of wordlists during preprocessing.

type WordList = Vector Text Source #

Explanatory type alias for immutable, preprocessed wordlist used by random number generator.

Reading inputs

resolveSymbolicLink :: FilePath -> IO FilePath Source #

Try to resolve symbolic link chain for given filename.

readDict :: FilePath -> IO WordSet Source #

Reads a dict format to get a list of unique words without any special chars.

dictFiles :: FilePath -> IO [FilePath] Source #

Find all plausible dictionaries in a given directory

readDicts :: [FilePath] -> IO (Set Text) Source #

Read a set of dictionaries and put the together.

readDictDir :: FilePath -> IO (Set Text) Source #

Read all dictionaries from a given directory.

defaultDictionary :: FilePath Source #

Filename for default dictionary (should be command line argument or default glob.)

randomPassword :: WordList -> Int -> Gen Text Source #

Pick a random password, given a words list, and a number of words it will contain.

capitalized :: Text -> Text Source #

First character uppercase, all others lowercase

uncapitalized :: Text -> Text Source #

First character lowercase, all others uppercase

evenUpperOddLower :: Text -> Text Source #

Swap case for each letter, starting from upper

evenLowerOddUpper :: Text -> Text Source #

Swap case, starting from lower

randomCase :: Gen Text -> Gen Text Source #

Randomize letter case within the word.

caseVariants :: [Text -> Text] Source #

Different uppercase/lowercase variants of each word.

randomPasswordStrength :: Vector a -> Int -> Double Source #

Estimate strength of random password with given inputs.

numSymbols :: Int Source #

Number of characters within alphabet.

numNumericSeparators :: Int Source #

Since we use two-digit separators, there are 100 different.

Random separators

randomSeparator :: Gen Text Source #

Randomly pick a word separator as a two-digit number, or a symbol character.

randomNumericSeparator :: Gen Text Source #

Two-digit number as a separator 10^2 = 6.6 bits of entropy.

(|||) :: (t -> Bool) -> (t -> Bool) -> t -> Bool Source #

Conjunction of two unary predicates

symbolChars :: Vector Char Source #

List of symbol and punctuation characters in ASCII Should be 5 bits of entropy

randomSymbolSeparator :: Gen Text Source #

Text with random symbol character, 5 bits of entropy