Codeunit "Password Handler"
ID 1284
Namespace: System.Security.AccessControl
Provides the functionality for generating and validating passwords.
Properties
| Name | Value |
|---|---|
| Access | Public |
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
GenerateSecretPassword
Generates a password that consists of a number of characters defined by the
procedure GenerateSecretPassword(): SecretText
Returns
| Type | Description |
|---|---|
| SecretText |
The generated password. |
GenerateSecretPassword
Generates a password that consists of a user-defined number of characters, and meets the
procedure GenerateSecretPassword(Length: Integer): SecretText
Parameters
| Name | Type | Description |
|---|---|---|
| Length | Integer |
The number of characters in the password. Passwords must contain at least eight characters. |
Returns
| Type | Description |
|---|---|
| SecretText |
The generated password. |
IsPasswordStrong
Check whether the password meets the following conditions:
- Contains at least the number characters defined by
event, but it cannot be less than eight. - Contains uppercase and lowercase characters, digits, and special characters.
- Does not contain sequences of characters. For example, aaa or 123.
procedure IsPasswordStrong(Password: SecretText): Boolean
Parameters
| Name | Type | Description |
|---|---|---|
| Password | SecretText |
The password to check. |
Returns
| Type | Description |
|---|---|
| Boolean |
True if the password meets the conditions for strong passwords. |
GetPasswordMinLength
Gets the minimum length of the password. It is defined by
procedure GetPasswordMinLength(): Integer
Returns
| Type | Description |
|---|---|
| Integer |
The minimum length of the password. Eight by default. |