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

requiredLength
int

The minimum required length of the generated password.

requireDigit
bool

true to require a digit in the generated password, otherwise false

requireLower
bool

true to require a lowercase letter in the generated password, otherwise false

requireUpper
bool

true to require an uppercase letter in the generated password, otherwise false

requireSpecial
bool

true to require a non digit or letter in the generated password, otherwise false

Returns

string

A random password string.