spg
spg copied to clipboard
1Password's Strong Password Generator - Go package
For maximum safety it is better to use `regexp.QuoteMeta` instead of wrapping a string with `\Q` and `\E` (think about the case where the string ends with `\`).
We should be able to produce a recipe from a [password rules](https://developer.apple.com/password-rules/) string. Both the character and wordlist generators could support this, returning an error if the supplied requirements are...
Simplify randomUint32 to reduce `[]byte` bounds checks and drop dependency on encoding/binary. From Rob Pike's Go proverbs: > A little copying is better than a little dependency
Fix the generated code: * apply the Go standard for generated code defined at https://golang.org/s/generatedcode * add `Makefile` rules to run the code generators: `make generate`
Fix gitignore patterns to not exclude cmd/opgen/opgen.go. Also, move patterns specific to this project at the top of the file to distinguish them from standard patterns.
```console $ go run go.1password.io/spg/cmd/[email protected] Usage of /var/folders/7b/5rfj3bgs3tj34c6f2jy8h39w0000gn/T/go-build4052941408/b001/exe/opgen: $ go run go.1password.io/spg/cmd/[email protected] -help Usage of /var/folders/7b/5rfj3bgs3tj34c6f2jy8h39w0000gn/T/go-build4052941408/b001/exe/opgen: $ go run go.1password.io/spg/cmd/[email protected] help opgen characters [--length=] [--allow=] [--exclude=] [--require=] [--entropy] --length generate...
As a Go module is now defined, the README file must be updated to remove outdated information that tells to use `govendor`.
Given a set of requirements, e.g. a password rules string (#19), but no other options, generate an appropriately strong but user-friendly password. The API will be able to select from...
See https://pkg.go.dev/go.1password.io/spg/cmd/opgen : no package documentation that tells how to use the program.