randomPassword

Generates a random password.

This is limited to generating ASCII passwords. This is because including non-ASCII characters in generated passwords is more complex, more error-prone, more likely to trigger latent unicode bugs in other systems, and not particularly useful anyway.

Throws an Exception if passwordChars.length isn't at least 2.

USE THIS RESPONSIBLY! NEVER EMAIL THE PASSWORD! Emailing a generated password to a user is a highly insecure practice and should NEVER be done. However, there are other times when generating a password may be reasonable, so this is provided as a convenience.

More...

Detailed Description

Optional Params

Rand - Default value is 'DefaultCryptoRand'

length - Default value is 'defaultPasswordLength'

passwordChars - Default value is 'defaultPasswordChars'

Meta