~alva/passphrase

Small, simple passphrase generator.
Zig build system updates
Update README
Updates for Zig master

clone

read-only
https://git.sr.ht/~alva/passphrase
read/write
git@git.sr.ht:~alva/passphrase

You can also use your local clone with git send-email.

#About

Passphrase is a small, simple passphrase generator.

builds.sr.ht status

#Background

I was using Bitwarden's passphrase generator, which is good, except it only uses English words, and is also very slow. So I made this one. It's pretty fast (over 6000 times faster than bw generate -p,) and you can use any wordlist. An English wordlist is included, and is the default.

#Building

The program is written in Zig, so you will need the Zig compiler, which is called zig in most package managers. You can also download a static build if it's not packaged for you.

To build and install the program:

zig build -Doptimize=ReleaseFast --prefix ~/.local

It installs an executable file in $PREFIX/bin, so that should be in your $PATH.

To run the tests:

zig build test

#Usage

Use passphrase -h to see the available options. Some examples:

passphrase
demontering vestlandsturnear pacemen

passphrase -x # add a random symbol
intimacy urvriden overprest$

passphrase -d # add a random digit
folkinitiativ elefantritt felfinneri0

passphrase -c # capitalise each word
Alligator Eignarlandi Armkraft

passphrase -s _ # change the separator
afdreginni_glaskasse_opplevingi

passphrase -s '' # use an empty separator
tansprungephantasmagoriandeviancy

passphrase -w 6 # it should have 6 words
dobbeltleveranse skunkworks kubikfot veggtavlone freeridden polarimeter

passphrase -f path/to/english_words.txt # use different dictionary
likelihood impassible educational

passphrase -xdcs /
Batwomen/Velopharyngeal/Bildekort&9

passphrase -p # generate a gibberish password
0"[YtPUB5R'jBs.24\X~^<z$Xmkz/tGi

If the output is piped into another command, for example passphrase | wl-copy to put the passphrase in the clipboard, the ending newline is omitted, so that it can be safely pasted.