-
-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Description
Enough discussion has been made about making a better password function.
What i would like to do is update the function to take in a struct of fields to determine the generated string output
Types:
simple - currently what we have. options would be
words - simple to memorize words separated by dash. options would just be length
pin - length x # - default length 4 if type is set to pin and length not set
type PassConfig struct {
Type: string
Length: int // used by multiple
// Simple Fields
Lower: boolean
Upper: boolean
// etc...
// Words/Pin - may not need other than length
}
Things to keep in mind:
- Performance - It doesnt have to be the fastest thing in the world but lets be tight about allocation to generate a password
- Separate by types - the function should switch statement between the different private password function types
- Struct - lets keep it flat to help with lookup field mapping
- Can pass in nil and will set default. This keeps it simple if people just need whatever we give
- Breaking change - Update everything else that uses it and PR MERGE INTO V8 BRANCH! I will be merging other breaking changes there.
Metadata
Metadata
Assignees
Labels
No labels