Skip to content

RasmusNygren/go-passphrase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Passphrase generator

This is a minimal passphrase generator based on the diceware method.

Usage

Using default wordlists

import (
    "github.com/RasmusNygren/go-passphrase/passphrase"
)
// Generate a passphrase consisting of 4 words from the EffSmallShortWords wordlist
wordlist := passphrase.EffSmallShortWords()
phrase := passphrase.GeneratePhrase(wordlist, numWords)

Using custom wordslists

Given a text file with whitespace-seperated columns of id to word. See example Short wordlist

import (
    "github.com/RasmusNygren/go-passphrase/passphrase"
)
// digits is the length of the id-numbers
wordlist := passphrase.NewWordList(path, digits)
phrase := passphrase.GeneratePhrase(wordlist, numWords)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages