Secure but memorable passphrase generator
Correct Horse: A memorable passphrase generator
Correct Horse is a tool for generating resonably secure but reasonably memorable passphrases. It does this by picking a set of words from a dictionary and then sorting them into an order that plausibly makes sense as a phrase. It can be used either as a command line tool to generate and print a passphrase that one might enter into another application or through an API to pick new passphrases for something like a rotating code on a WiFi network.
correcthorse [-h] [-n MAX_WORDS] [-N MAX_LETTERS] [-l] [-c] [-u] [-s] [-j] [-H] [-S SEPARATOR] [-f FILENAME] [-L LOCALE]
-n WORD_COUNT or
--max_words WORD_COUNT option to set the maximum number of words in the passphrase. Use the
-N LETTER_COUNT or
--max_letters LETTER_COUNT option to set the maximum number of letters in the passphrase. You may set both
--lower-case will cause all of the words in the passphrase to be printed in lower case while the
--capitalise flag will cause the first letter of each word to be capitalised. The default is to capitalise the first letter.
When the words of the passphrase are printed a seperator string will be placed between then. This can be set using the
-S SEPARATOR or
--separator SEPARATOR option. For convenience you can use
--underscore to join the words with an underscore,
--space to join the words with a space,
--hyphen to join the words with a hyphen or
--join to simply run the words together without a separator.
correcthorse will detect your locale and pick a word set that matches your local language. You can override the detected locale using the
-L LOCALE or
--locale LOCALE options. While great in theory, unless your language is English the chances are that currently there is no built in word file for your language. You can however specify a custom word file using the
--word-file FILENAME options.
Use as a python module
To use the
correcthorse module through the API create an instance of the
WordSet(filename=None, locale=None, encoding='UTF-8') and then call
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size correcthorse-0.2.0-py3-none-any.whl (14.8 kB)||File type Wheel||Python version py3||Upload date||Hashes View hashes|
|Filename, size correcthorse-0.2.0.tar.gz (19.1 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for correcthorse-0.2.0-py3-none-any.whl