1
0
Fork 0
mirror of https://github.com/Luzifer/password.git synced 2024-12-20 04:41:17 +00:00
Fast and secure password generator and library
Find a file
2018-03-21 11:28:43 +01:00
alfred-workflow Make generated passwords actionable again 2018-03-21 11:10:13 +01:00
frontend Add ability to generate XKCD style passwords to tool 2017-10-31 12:24:25 +01:00
hasher Implement JSON output with password hashes 2017-10-06 22:54:45 +02:00
lib Add XKCD style password generator 2017-10-31 12:10:24 +01:00
vendor Fix: Vendor new dependencies 2017-10-06 22:59:38 +02:00
.gitignore Rebuilt workflow for better design and auto-update 2017-09-22 17:38:08 +02:00
.gitmodules Rebuilt workflow for better design and auto-update 2017-09-22 17:38:08 +02:00
.repo-runner.yaml Fix: Need to download submodules before packaging 2017-09-22 17:42:13 +02:00
.travis.yml Fix: Travis build broken through different tools 2017-09-22 15:50:26 +02:00
bindata.go Add ability to generate XKCD style passwords to tool 2017-10-31 12:24:25 +01:00
build-workflow.sh Fix: Workflow building broken by zipping artifacts 2018-03-21 11:26:37 +01:00
cmdGet.go Add commandline flag to generate multiple passwords 2017-10-31 12:57:19 +01:00
cmdServe.go Add ability to generate XKCD style passwords to tool 2017-10-31 12:24:25 +01:00
cmdVersion.go Replaced codegangsta/cli by spf13/cobra 2015-05-29 20:20:04 +02:00
Dockerfile Update Dockerfile to golang:alpine template 2017-09-22 15:27:18 +02:00
flags.go Add commandline flag to generate multiple passwords 2017-10-31 12:57:19 +01:00
generateXKCDWordList.sh Add XKCD style password generator 2017-10-31 12:10:24 +01:00
Gopkg.lock Fix: Vendor new dependencies 2017-10-06 22:59:38 +02:00
Gopkg.toml Vendor dependencies 2017-09-22 15:28:56 +02:00
History.md prepare release v1.10.1 2018-03-21 11:28:43 +01:00
LICENSE Replace Apache license stub with proper license 2017-09-22 15:32:49 +02:00
main.go Add ability to generate XKCD style passwords to tool 2017-10-31 12:24:25 +01:00
Makefile Add XKCD style password generator 2017-10-31 12:10:24 +01:00
README.md Add hint for XKCD style passwords 2018-03-21 11:15:05 +01:00

Go Report Card

Luzifer / password

This project is a rewrite of my former password generator written in Python. The intention is to provide a fast and secure way to generate one or more passwords using a CLI tool, a HTTPs page or a HTTPs API.

Usage

Via Web

My service Secure Password is powered by this app and will provide you with secure passwords.

Via Alfred

  1. Ensure you do have Alfred 3 and have enabled the Powerpack
  2. Download and open the PasswordGenerator.alfredworkflow from Github releases
  3. Let Alfred install the workflow
  4. Generate passwords using pwd 12, with special characters pwd 12 s or XKCD style pwd 4 x

The workflow is set up to automatically check for updates once a day. If you want to check for updates manually open Alfred, enter pwd workflow:update and press enter.

Via CLI

  1. Download the compiled binary from Github releases

  2. Generate your password:

    # ./password get -h
    NAME:
      get - generate and return a secure random password
    
    USAGE:
      command get [command options] [arguments...]
    
    OPTIONS:
      --length, -l "20"	length of the generated password
      --special, -s	use special characters in your password
    
    # ./password get
    Vzupi4IaPbXmSQEX9A4e
    
    # ./password get -l 32 -s
    }d.sks(4J$2G]x52=k)WAN{M68LxEg}%
    

Via API

  • /v1/getPassword - Retrieve a password from the API
    • length=20 - Specify the length of the password to generate
    • special=false - Set to true to enable special characters

Self-Hosted

  1. Download the compiled binary from Github releases

  2. Run the API server:

    # ./password serve -h
    NAME:
      serve - start an API server to request passwords
    
    USAGE:
      command serve [command options] [arguments...]
    
    OPTIONS:
      --port "3000"	port to listen on
    
  3. Request your password using http://localhost:3000/v1/getPassword?length=20&special=true

Hosted

# curl https://pwd.luzifer.io/v1/getPassword?length=20&special=true
0M4L-1[lT:@2&7,p,o-;

Benchmark / Test

Tests and benchmark are run by Travis CI at every push to this repository:

Build Status

# go test -bench .
PASS
BenchmarkGeneratePasswords8Char           20000       74875 ns/op
BenchmarkGeneratePasswords8CharSpecial    10000      108451 ns/op
BenchmarkGeneratePasswords16Char          10000      135059 ns/op
BenchmarkGeneratePasswords16CharSpecial   10000      142958 ns/op
BenchmarkGeneratePasswords32Char           5000      307994 ns/op
BenchmarkGeneratePasswords32CharSpecial    5000      284031 ns/op
BenchmarkGeneratePasswords128Char           300     6721034 ns/op
BenchmarkGeneratePasswords128CharSpecial    500     3244446 ns/op
ok  	github.com/Luzifer/password/lib	13.764s