pwdgen

command module
v0.0.0-...-b6b102d Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: BSD-3-Clause Imports: 19 Imported by: 0

README

Password Generator

Password generator, support KeePass 1.x format file.

Install from Standalone File

Then go run pwdgen_$GOOS.go or go build -o pwdgen.exe pwdgen_$GOOS.go.

Install With go get

go get github.com/bsed/pwdgen

Usage

$ pwdgen id0
$ pwdgen id0 id1 id2

$ pwdgen -salt=site0 id0
$ pwdgen -salt=site0 id0 id1 id2

$ pwdgen -encrypt-key=111 id0
$ pwdgen -encrypt-key=111 id0 id1 id2

$ pwdgen -encrypt-key=111 -salt=site0 id0 id1
$ pwdgen -encrypt-key=111 -salt=site0 id0 id1
$ pwdgen -encrypt-key=111 -salt=site0 id0 id1

$ # Generate config.ini template
$ pwdgen -gen-config=config.ini

$ # *.ini -> *.keepass1x.csv
$ pwdgen -keepass-config=config.ini
$ pwdgen -keepass-config=config.ini -encrypt-key=111

$ pwdgen -version
$ pwdgen -help
$ pwdgen -h

Use in Go

package main

import (
	"fmt"
	pwdgen "github.com/bsed/pwdgen"
)
func main() {
	fmt.Println(pwdgen.PwdGen("id0", "site0", "111", "fuckcsdn"))
	// Output: 2jNXfMGoXTSK9pFS
}

See (Issue4210).

Algorithm

base58(sha512(md5hex(encryptKey+encryptSalt)+siteId+siteSalt)[0:16]

Reference

Documentation

Overview

pwdgen -salt=site0 id0
pwdgen -salt=site0 id0 id1 id2

pwdgen -encrypt-key=111 id0
pwdgen -encrypt-key=111 id0 id1 id2

pwdgen -encrypt-key=111 -salt=site0 id0 id1
pwdgen -encrypt-key=111 -salt=site0 id0 id1
pwdgen -encrypt-key=111 -salt=site0 id0 id1

# Generate config.ini template
pwdgen -gen-config=config.ini

# KeePass: See config.ini
# output: *.ini -> *.keepass1x.csv
pwdgen -keepass-config=config.ini
pwdgen -keepass-config=config.ini -encrypt-key=111

pwdgen -version
pwdgen -help
pwdgen -h

Report bugs to <MortalSkulD@gmail.com>.

Jump to

Keyboard shortcuts

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