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

GeneratePassword

Obsolete

This element will become obsolete from version 24.0. Replaced by GenerateSecretPassword with SecretText data type.

Generates a password that consists of a number of characters defined by the method, and meets the conditions.

[Obsolete(Replaced by GenerateSecretPassword with SecretText data type.,24.0)]
[NonDebuggable]
procedure GeneratePassword(): Text

Returns

Type Description
Text

The generated password.

GeneratePassword

Obsolete

This element will become obsolete from version 24.0. Replaced by GenerateSecretPassword with SecretText data type.

Generates a password that consists of a user-defined number of characters, and meets the conditions.

[Obsolete(Replaced by GenerateSecretPassword with SecretText data type.,24.0)]
[NonDebuggable]
procedure GeneratePassword(Length: Integer): Text

Parameters

Name Type Description
Length Integer

The number of characters in the password. Passwords must contain at least eight characters.

Returns

Type Description
Text

The generated password.

IsPasswordStrong

Obsolete

This element will become obsolete from version 24.0. Replaced by IsPasswordStrong with SecretText data type.

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.
[Obsolete(Replaced by IsPasswordStrong with SecretText data type.,24.0)]
[NonDebuggable]
procedure IsPasswordStrong(Password: Text): Boolean

Parameters

Name Type Description
Password Text

The password to check.

Returns

Type Description
Boolean

True if the password meets the conditions for strong passwords.

GenerateSecretPassword

Generates a password that consists of a number of characters defined by the method, and meets the conditions.

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 conditions.

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 event, but it cannot be less than eight.

procedure GetPasswordMinLength(): Integer

Returns

Type Description
Integer

The minimum length of the password. Eight by default.

See also