UserService.GeneratePassword Method
- Namespace:
- Weavy.Core.Services
- Assembly:
- Weavy.Core.dll
GeneratePassword(int, bool, bool, bool, bool)
Generates a random password.
public static string GeneratePassword(int requiredLength = 6, bool requireDigit = true, bool requireLower = true, bool requireUpper = true, bool requireSpecial = true)
Parameters
- required
Length - int
The minimum required length of the generated password.
- require
Digit - bool
true
to require a digit in the generated password, otherwise false
- require
Lower - bool
true
to require a lowercase letter in the generated password, otherwise false
- require
Upper - bool
true
to require an uppercase letter in the generated password, otherwise false
- require
Special - bool
true
to require a non digit or letter in the generated password, otherwise false
Returns
string
A random password string.