Secure but memorable passphrase generator
Project description
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.
Usage
Command line
correcthorse [-h] [-n MAX_WORDS] [-N MAX_LETTERS] [-l] [-c] [-u] [-s] [-j] [-H]
[-S SEPARATOR] [-f FILENAME] [-L LOCALE]
Use the -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
The -l or --lower-case will cause all of the words in the passphrase to be printed in lower case while the -c or --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 -u or --underscore to join the words with an underscore, -s or --space to join the words with a space, -H or --hyphen to join the words with a hyphen or -j or --join to simply run the words together without a separator.
By default 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 -f FILENAMEor --word-file FILENAME options.
Use as a python module
To use the correcthorse module through the API create an instance of the WordSet using WordSet(filename=None, locale=None, encoding='UTF-8') and then call random_phrase(max_words=4).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file correcthorse-0.2.0.tar.gz.
File metadata
- Download URL: correcthorse-0.2.0.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a91e9779237111e99ffab88ebe3d9cb6125bb17eb4144e7d072154bf7a39c494
|
|
| MD5 |
8d72e0629741f5637b668302bd7b5845
|
|
| BLAKE2b-256 |
ed9a848eaafbc653d053701020f31371261e2f78b92a4648e1496e4dd87665cf
|
File details
Details for the file correcthorse-0.2.0-py3-none-any.whl.
File metadata
- Download URL: correcthorse-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
171fd4f5909a738e1e42a8c4af30b0ce1f4c4a9fbaf56c3ecdefb3cfa7366ccf
|
|
| MD5 |
b81b1c9009d5ea3e8758a4f1ab2d9906
|
|
| BLAKE2b-256 |
8ef55e4a761cf977933c1b370e648ddc2c80341ac88ceda7c0cd55459cc842e3
|