Class Passwords
- Namespace
- Tripous
- Assembly
- Tripous.dll
Static class for generating and validating passwords.
public static class Passwords
- Inheritance
-
Passwords
- Inherited Members
Fields
SpecialChars
Special characters.
public static readonly string SpecialChars
Field Value
Methods
GeneratePassword(int, bool, bool, bool, bool)
Generates a random password and guarantees that each selected character category appears at least once.
public static string GeneratePassword(int MinLength = 12, bool UseUpperCase = true, bool UseLowerCase = true, bool UseNumbers = true, bool UseSpecialChars = false)
Parameters
Returns
IsValid(string, int, int, bool, bool, bool, bool)
Validates a password, according to specified requirements regarding its content and length, and returns the result.
public static bool IsValid(string Password, int MinLength = 8, int MaxLength = 12, bool UseLowerChars = true, bool UseUpperChars = true, bool UseDigitChars = true, bool UseSpecialChars = true)
Parameters
PasswordstringMinLengthintMaxLengthintUseLowerCharsboolUseUpperCharsboolUseDigitCharsboolUseSpecialCharsbool