Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Passphrase Generator

Project description

Generate passphrases by randomly selecting and concatenating words from a list.

Note: This project is no longer maintained. Use xkcdpass instead.

https://imgs.xkcd.com/comics/password_strength.png

Installation

Use pip to install Keysmith.

pip install keysmith

Usage

Keysmith can be invoked from a command-line or imported in Python.

CLI

$ keysmith --help
usage: keysmith [-h] [--delimiter DELIMITER] [--encoding ENCODING]
                [--nsamples NTEETH] [--population POPULATION] [--stats]
                [--version]

optional arguments:
  -h, --help            show this help message and exit
  --delimiter DELIMITER
                        a delimiter for the samples (teeth) in the key
                        (default: )
  --encoding ENCODING   the encoding of the population file (default: utf-8)
  --nsamples NTEETH, -n NTEETH
                        the number of random samples to take (default: 6)
  --population POPULATION, -p POPULATION
                        alphanumeric, ascii_letters, digits, printable, or a
                        path to a file of line-delimited items (default:
                        /usr/share/dict/words)
  --stats               show statistics for the key (default: False)
  --version             show program's version number and exit
$ keysmith -n4
correct horse battery staple

API

>>> import keysmith
>>> help(keysmith)
>>> with open('/usr/share/dict/words', 'r') as words:
...     keysmith.key(seq=list(words), nteeth=4, delimiter=' ')
...
'correct horse battery staple'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for keysmith, version 3.0.1
Filename, size File type Python version Upload date Hashes
Filename, size keysmith-3.0.1-py3-none-any.whl (4.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size keysmith-3.0.1.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page