VGSecurityManagerGeneratePassword Method
|
Generates a random password of the specified length.
Namespace:
Novalys.VisualGuard.Security
Assembly:
Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 2019.1.831.19 (2019.1.0831.19)
Syntax public static string GeneratePassword(
int length,
int numberOfNonAlphanumericCharacters
)
Public Shared Function GeneratePassword (
length As Integer,
numberOfNonAlphanumericCharacters As Integer
) As String
Parameters
- length
- Type: SystemInt32
The number of characters in the generated password. The length must be between 1 and 64 characters. - numberOfNonAlphanumericCharacters
- Type: SystemInt32
The number of punctuation characters in the generated password.
Return Value
Type:
StringA random password of the specified length.
Exceptions Exception | Condition |
---|
ArgumentException | length is less than 1 or greater than 64.
- or - numberOfNonAlphanumericCharacters is less than zero or greater than length |
See Also