Coder Social home page Coder Social logo

passcat-go's Introduction

Passcat

Passcat lets you generate cryptographically secure, memorable passphrases using the diceware algorithm.

Contents

Installation

$ go get -u github.com/iamcryptoki/passcat-go/passcat

Usage

package main

import (
    "log"
    "strings"

    "github.com/iamcryptoki/passcat-go/passcat"
)

func main() {
    // Generate 8 words in French using the diceware algorithm.
    p1, err := passcat.Generate("fr", 8, 1)
    if err != nil  {
        log.Fatal(err)
    }

    log.Printf(strings.Join(p1, "-"))

    // Generate 5 passphrases in Japanese
    // using the diceware algorithm.
    p2, err := passcat.Generate("jp", 8, 5)
    if err != nil {
        log.Fatal(err)
    }

    for _, p := range p2 {
        log.Printf(strings.Join(p, "-"))
    }
}

CLI

$ go install github.com/iamcryptoki/passcat-go/cmd/passcat

Basic usage:

$ passcat
risk freckled onslaught bouncing subpar winner syndrome

Specify the number of words to use in the passphrase:

$ passcat -w 10
provoke study crease fling dispense erasable drone monkhood trilogy outboard

Specify the number of passphrases to generate:

$ passcat -p 5
shelving ample marry fiscally osmosis boogeyman shrank
judiciary said eldercare utensil moonwalk frail swifter
capacity edginess rimless passably overhang jury backlash
attic ritalin headroom repost unhinge frenzied very
untangled gallstone gender anemic willfully calorie stainless

Specify a wordlist other than EFF:

$ passcat -l fr
logiez neuve brebis mastoc ortie tentes tilts

Available wordlists

Language Code
EFF (English) eff
Dutch nl
French fr
German de
Italian it
Japanese jp
Norwegian no
Polish pl
Romanian ro
Russian ru
Spanish es
Swedish se
Turkish tr

License

This code is released under a free software license and you are welcome to fork it.

passcat-go's People

Contributors

iamcryptoki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.