mirror of
https://github.com/Luzifer/password.git
synced 2024-12-20 12:51:17 +00:00
Update README
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
1d9b7dcbc8
commit
f4c0499192
1 changed files with 60 additions and 37 deletions
93
README.md
93
README.md
|
@ -5,16 +5,25 @@
|
||||||
|
|
||||||
# Luzifer / password
|
# 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.
|
The intention of this project 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.
|
||||||
|
|
||||||
|
For the security of the passwords there are several assertions:
|
||||||
|
|
||||||
|
- The password may not contain pattern found on the keyboard or in alphabet
|
||||||
|
- The password must have 3 or 4 different character groups in it depending on whether special characters are requested
|
||||||
|
- The password may not have repeating characters
|
||||||
|
- The API generator does not transmit or store any data about the generated passwords
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Via Web
|
### Via Web
|
||||||
|
|
||||||
My service [Secure Password](https://pwd.luzifer.io/) is powered by this app and will provide you with secure passwords.
|
My service [Secure Password](https://passwd.fyi/) is powered by this app and will provide you with secure passwords.
|
||||||
|
|
||||||
### Via [Alfred](https://www.alfredapp.com/)
|
### Via [Alfred](https://www.alfredapp.com/)
|
||||||
|
|
||||||
|
_(No longer actively maintained as I no longer use OSX / Alfred. The current version stays until it gets reported to be broken and will then get removed.)_
|
||||||
|
|
||||||
1. Ensure you do have Alfred 3 and have enabled the Powerpack
|
1. Ensure you do have Alfred 3 and have enabled the Powerpack
|
||||||
2. Download and open the `PasswordGenerator.alfredworkflow` from [Github releases](https://github.com/Luzifer/password/releases/latest)
|
2. Download and open the `PasswordGenerator.alfredworkflow` from [Github releases](https://github.com/Luzifer/password/releases/latest)
|
||||||
3. Let Alfred install the workflow
|
3. Let Alfred install the workflow
|
||||||
|
@ -27,53 +36,62 @@ The workflow is set up to automatically check for updates once a day. If you wan
|
||||||
1. Download the compiled binary from [Github releases](https://github.com/Luzifer/password/releases/latest)
|
1. Download the compiled binary from [Github releases](https://github.com/Luzifer/password/releases/latest)
|
||||||
2. Generate your password:
|
2. Generate your password:
|
||||||
|
|
||||||
```bash
|
```console
|
||||||
# ./password get -h
|
$ ./password get -h
|
||||||
NAME:
|
generate and return a secure random password
|
||||||
get - generate and return a secure random password
|
|
||||||
|
|
||||||
USAGE:
|
Usage:
|
||||||
command get [command options] [arguments...]
|
password get [flags]
|
||||||
|
|
||||||
OPTIONS:
|
Flags:
|
||||||
--length, -l "20" length of the generated password
|
-d, --date prepend current date to XKCD style passwords (default true)
|
||||||
--special, -s use special characters in your password
|
-h, --help help for get
|
||||||
|
-j, --json return output in JSON format
|
||||||
|
-l, --length int length of the generated password (default 20)
|
||||||
|
-n, --number int number of passwords to generate (default 1)
|
||||||
|
-s, --special use special characters in your password
|
||||||
|
-x, --xkcd use XKCD style password
|
||||||
|
|
||||||
# ./password get
|
$ ./password get
|
||||||
Vzupi4IaPbXmSQEX9A4e
|
Vzupi4IaPbXmSQEX9A4e
|
||||||
|
|
||||||
# ./password get -l 32 -s
|
$ ./password get -l 32 -s
|
||||||
}d.sks(4J$2G]x52=k)WAN{M68LxEg}%
|
}d.sks(4J$2G]x52=k)WAN{M68LxEg}%
|
||||||
|
|
||||||
|
$ ./password get -l 4 -x
|
||||||
|
20190101.SeashellSupporterTumbleweedGeneral
|
||||||
```
|
```
|
||||||
|
|
||||||
### Via API
|
### Via API
|
||||||
|
|
||||||
- `/v1/getPassword` - Retrieve a password from the API
|
- `/v1/getPassword` - Retrieve a password from the API
|
||||||
- `length=20` - Specify the length of the password to generate
|
- `date=true` - Set to `false` no to prepend the date to XKCD-style passwords
|
||||||
|
- `length=20` - Specify the length of the password to generate (the API only supports values between 4 and 128 - for more characters use the CLI)
|
||||||
- `special=false` - Set to `true` to enable special characters
|
- `special=false` - Set to `true` to enable special characters
|
||||||
|
- `xkcd=false` - Set to `true` to enable XKCD-style passwords
|
||||||
|
|
||||||
#### Self-Hosted
|
#### Self-Hosted
|
||||||
|
|
||||||
1. Download the compiled binary from [Github releases](https://github.com/Luzifer/password/releases/latest)
|
1. Download the compiled binary from [Github releases](https://github.com/Luzifer/password/releases/latest)
|
||||||
2. Run the API server:
|
2. Run the API server:
|
||||||
|
|
||||||
```bash
|
```console
|
||||||
# ./password serve -h
|
$ ./password serve -h
|
||||||
NAME:
|
start an API server to request passwords
|
||||||
serve - start an API server to request passwords
|
|
||||||
|
|
||||||
USAGE:
|
Usage:
|
||||||
command serve [command options] [arguments...]
|
password serve [flags]
|
||||||
|
|
||||||
OPTIONS:
|
Flags:
|
||||||
--port "3000" port to listen on
|
-h, --help help for serve
|
||||||
|
--port int port to listen on (default 3000)
|
||||||
```
|
```
|
||||||
3. Request your password using `http://localhost:3000/v1/getPassword?length=20&special=true`
|
3. Request your password using `http://localhost:3000/v1/getPassword?length=20&special=true`
|
||||||
|
|
||||||
#### Hosted
|
#### Hosted
|
||||||
|
|
||||||
```bash
|
```console
|
||||||
# curl https://pwd.luzifer.io/v1/getPassword?length=20&special=true
|
$ curl https://passwd.fyi/v1/getPassword?length=20&special=true
|
||||||
0M4L-1[lT:@2&7,p,o-;
|
0M4L-1[lT:@2&7,p,o-;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -83,16 +101,21 @@ Tests and benchmark are run by Travis CI at every push to this repository:
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/Luzifer/password.svg)](https://travis-ci.org/Luzifer/password)
|
[![Build Status](https://travis-ci.org/Luzifer/password.svg)](https://travis-ci.org/Luzifer/password)
|
||||||
|
|
||||||
```bash
|
```console
|
||||||
# go test -bench .
|
$ go test -bench .
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
pkg: github.com/Luzifer/password/lib
|
||||||
|
BenchmarkGeneratePasswords8Char-8 20000 65469 ns/op
|
||||||
|
BenchmarkGeneratePasswords8CharSpecial-8 20000 97659 ns/op
|
||||||
|
BenchmarkGeneratePasswords16Char-8 20000 84215 ns/op
|
||||||
|
BenchmarkGeneratePasswords16CharSpecial-8 20000 92885 ns/op
|
||||||
|
BenchmarkGeneratePasswords32Char-8 10000 152436 ns/op
|
||||||
|
BenchmarkGeneratePasswords32CharSpecial-8 10000 144352 ns/op
|
||||||
|
BenchmarkGeneratePasswords128Char-8 1000 2199011 ns/op
|
||||||
|
BenchmarkGeneratePasswords128CharSpecial-8 2000 1089225 ns/op
|
||||||
|
BenchmarkGeneratePasswords4Words-8 200000 9472 ns/op
|
||||||
|
BenchmarkGeneratePasswords20Words-8 100000 14098 ns/op
|
||||||
PASS
|
PASS
|
||||||
BenchmarkGeneratePasswords8Char 20000 74875 ns/op
|
ok github.com/Luzifer/password/lib 21.624s
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue