Visual Guard Class Library Documentation

VGSecurityManager.GeneratePassword Method 

Generates a random password of the specified length.

public static string GeneratePassword(
   Int32 length,
   Int32 numberOfNonAlphanumericCharacters
);

Parameters

length
The number of characters in the generated password. The length must be between 1 and 128 characters.
numberOfNonAlphanumericCharacters
The number of punctuation characters in the generated password.

Return Value

A random password of the specified length.

Exceptions

Exception Type Condition
ArgumentException length is less than 1 or greater than 2.

- or -

numberOfNonAlphanumericCharacters is less than zero or greater than length

VGConfigurationException The configuration file is not valid

or

A problem occurs during the connection to the repository.

or

The version of the repository or the version of the permissions is not supported by the application.

See Also

VGSecurityManager Class | Novalys.VisualGuard.Security Namespace