Class PasswordGenerator
- Namespace
- Dynamicweb.Security.Utilities
- Assembly
- Dynamicweb.Core.dll
Generates password
- Inheritance
-
Password
Generator
- Inherited Members
Methods
CheckPasswordComplexity(string, int, ref string, ref int, bool, bool)
Checks the password complexity and returns true if the password meets complexity rules or is empty.
public static bool CheckPasswordComplexity(string password, int userId, ref string errorMessage, ref int passwordErrorCode, bool forceReuseCheck, bool isBackendCheck)
Parameters
password
stringThe password.
userId
intThe User id.
errorMessage
stringThe error message.
passwordErrorCode
intThe password error code.
forceReuseCheck
boolIf set to
true
force check of password reuse.isBackendCheck
boolIf set to
true
force check by backend rules.
Returns
- bool
True
, if password complexity corresponds to system settings or is empty, otherwiseFalse
.
GeneratePassword()
Returns
GeneratePassword(int)
Generates a random password of the given length By default, Medium is used
Parameters
passwordLength
intThe length of the password to generate
Returns
GeneratePassword(int, SecurityLevel)
Generates a random password of the given length
public static string GeneratePassword(int passwordLength, PasswordGenerator.SecurityLevel securityLevel)
Parameters
passwordLength
intThe length of the password to generate
securityLevel
PasswordGenerator .SecurityLevel The security level to enforce for the password