Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 992 Bytes

README.md

File metadata and controls

41 lines (29 loc) · 992 Bytes

Diceware

Go Report Card GoDoc

Diceware is a small Golang package implementing the Diceware method. It uses word lists from the EFF

Installation

To install diceware, run the following command:

$ go get github.com/nouney/diceware

Example

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)
    }
}