redacted / XKCD-password-generator

Generate secure multiword passwords/passphrases, inspired by XKCD
BSD 3-Clause "New" or "Revised" License
1.32k stars 185 forks source link

This code is basically one line #26

Closed Taiiwo closed 9 years ago

Taiiwo commented 9 years ago

I get that this contains some fancy options for user prompting and such, but if users are coming here for a simple solution to auto-generating memorable and secure passwords, they could just use this:

from random import SystemRandom as r
' '.join(r().sample(open('wordlist.txt', 'r').read().splitlines(), 4))

Where 4 is the length, in words, of the password.

redacted commented 9 years ago

Running xkcdpass from the command line will generate a secure passphrase (following recommendations of diceware author for length). Having options to control the format of this passphrase is a strict improvement. Closing issue.