diceware

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2021 License: MIT Imports: 4 Imported by: 0

README

diceware

Simple command line interface password generator based at this.

Motivation

I created it, because CLI interface is more suitable for generating passwords for me than browser.

Installation

Install go tool chain with:

$ brew install go

on macOS or:

$ sudo dnf -y install go

on Fedora. I can bet that you can install go compiler on other linux distros with you favourite package manager.

Create directory for your go binaries and libraries in your home directory.

$ mkdir $HOME/go

Then add this environmental variables to your .zshrc or .bashrc.

export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"

Now you can clone this repository and build diceware with following commands.

$ git clone https://github.com/thinkofher/diceware.git
$ cd diceware
$ go build ./cmd/diceware

If you want to install diceware, just execute below command.

$ go install ./cmd/diceware

Now diceware binary is in your $GOPATH/bin directory, which is also added to your $PATH environmental variable, which means you can execute diceware like your other unix programs in your shell environment.

Have fun!

Usage

It is simple as:

$ diceware
QuackLassoMatadorAppealingMobilize

If you want to have more or less words in your password, just pass number of words to -words flag.

$ diceware -words 8
ClericalCrankUnmanagedUnthawedEndnoteGigglingUncouthNativity

You can generate more than one password with -passwords flag.

$ diceware -words 8 -passwords 3
RescuerStatisticLungHelperGarlicBruteClothesOutdoors
CranberryExpansionHuddlingStopperPrecinctExtraditeAnimatingCarless
XeroxIguanaBaffleRockstarBossMumpsUnfailingRecognize

You can use -w and -p shorthands for -words and -passwords flags and -help flag to output above information in more simpler way.

That's all folks! Thank you for your attention.

Security

diceware uses crypto/rand package for generating random numbers, which uses "global, shared instance of a cryptographically secure random number generator" of your OS.

So we can assume it's safe.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(wordsNum int) string

Generate generates diceware password with given number of words. Each word starts with capital letter and there are no spaces or other whitespace characters between words.

Types

This section is empty.

Directories

Path Synopsis
cmd
diceware command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL