Knut Ahlers
d217ac0642
to prevent blank HTML without styling Signed-off-by: Knut Ahlers <knut@ahlers.me> |
||
---|---|---|
alfred-workflow | ||
frontend | ||
hasher | ||
js | ||
lib | ||
vendor | ||
.gitignore | ||
.gitmodules | ||
.repo-runner.yaml | ||
.travis.yml | ||
bindata.go | ||
build-workflow.sh | ||
cmdGet.go | ||
cmdServe.go | ||
cmdVersion.go | ||
Dockerfile | ||
flags.go | ||
generateXKCDWordList.sh | ||
Gopkg.lock | ||
Gopkg.toml | ||
History.md | ||
LICENSE | ||
main.go | ||
Makefile | ||
README.md |
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
- Ensure you do have Alfred 3 and have enabled the Powerpack
- Download and open the
PasswordGenerator.alfredworkflow
from Github releases - Let Alfred install the workflow
- Generate passwords using
pwd 12
, with special characterspwd 12 s
or XKCD stylepwd 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
-
Download the compiled binary from Github releases
-
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 APIlength=20
- Specify the length of the password to generatespecial=false
- Set totrue
to enable special characters
Self-Hosted
-
Download the compiled binary from Github releases
-
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
-
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:
# 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