-
Notifications
You must be signed in to change notification settings - Fork 1
Password
nhash password
is a sub-command of nHash tool used to generate a random password with various options such as password length, prefix, suffix, and character set.
nhash password [options]
-
--no-upper
: Exclude uppercase characters (A-Z) from the password. The default value is False. -
--no-lower
: Exclude lowercase characters (a-z) from the password. The default value is False. -
--no-number
: Exclude numbers (1234567890) from the password. The default value is False. -
--no-special
: Exclude special symbols (*$-+?_&=!%{}/) from the password. The default value is False. -
--custom <custom>
: Specify custom characters for the password. If this option is selected, all other character set options will be removed. -
-l, --length <length>
: Specify the password length. The default value is 16. -
--prefix <prefix>
: Specify a prefix for the password. -
--suffix <suffix>
: Specify a suffix for the password. -
-o, --output <output>
: Specify the output file name to write the generated password. -
-?, -h, --help
: Display the help and usage information.
Note that all options are optional and the default values are set to generate a password that includes all character sets (uppercase letters, lowercase letters, numbers, and special characters) and has a length of 16 characters.
Generate a random password with a length of 12 characters, including uppercase letters, lowercase letters, and numbers:
nhash password -l 12 --no-special
Generate a random password with a length of 8 characters, including only uppercase letters:
nhash password -l 8 --no-lower --no-number --no-special
Generate a random password with a custom character set and a length of 10 characters:
nhash password --custom abc123 -l 10
Generate a random password with a length of 20 characters and a prefix and suffix:
nhash password --length 20 --prefix "nHash-" --suffix "-2023"