CryptographyGetRandomPassword Method
Creates a random password of a specified length. The password will be usable
with Microsoft Windows security.
Namespace: InnerDrive.CoreAssembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.2.9017.0
public static string GetRandomPassword(
int passwordLength
)
- passwordLength Int32
- The length, in characters, of the password to return.
StringA
String containing the password.
This method does not use a cryptographically strong random number generation
algorithm. Also, it returns printable ASCII characters only between 0x21 and 0x7E, excluding
0x22 ("), 0x27 ('), 0x2C (,), 0x2E (.), and 0x60 (`). As a result, the password
cannot be guaranteed unique or cryptographically strong, but for practical purposes
it will be close enough.