Diceware is a small Golang package implementing the Diceware method. It uses word lists from the EFF
To install diceware
, run the following command:
$ go get github.com/nouney/diceware
package main
import (
"fmt"
"log"
"github.com/nouney/diceware"
)
func main() {
// Pick a word from the large list
word, err := diceware.Pick(diceware.LargeList)
if err != nil {
panic(err)
}
// Generate a passphrase
passphrase, err := diceware.Passphrase(4, diceware.LargeList)
if err != nil {
panic(err)
}
}