Closed Greenheart closed 3 years ago
// IDEA: Maybe add password generation as an option
// If the option is present, potential `[password]` argument will be ignored.
// If the option is not defined, `[password]` should be treated as an required argument.
pagecrypt
.option('-g, --generate-password', 'Generate a random password with a given length', 80)
Will be released with 3.2.0
Since automated password generation is required in all 4 current
pagecrypt
use cases, it might be a good idea to add it to the core library, to reduce the need for external dependencies.This basic password generator implements the main features of
generate-password
except the strict mode. However, with sufficient password length, this shouldn't be any problem.This implementation also seems to be faster compared to
generate-password
, since it uses fewer operations.How to implement
-g [length]
/--generate [length]
flag