Editar

Compartir a través de


System.Encrypt(Text) Method

Version: Available or changed with runtime version 1.0.

Takes a string as input and returns the encrypted value of the string.

Syntax

EncryptedString :=   System.Encrypt(PlainTextString: Text)

Note

This method can be invoked without specifying the data type name.

Parameters

PlainTextString
 Type: Text
The input string that will be encrypted. The input string cannot exceed a length of 215 plain characters. If the input string includes special characters the length is even more reduced.

Return Value

EncryptedString
 Type: Text
The output string that is encrypted.

Remarks

If encryption is not enabled or the encryption key is not found, the following error will be displayed: An encryption key is required to complete the request.

Example

var
    Text000: Text;
begin
    Text000 := 'ABC123';  
    Message('Value: ' + Text000);  
    Text000 := Encrypt(Text000);  
    Message('Value: ' + Text000);  
end;

This code example takes the string value ABC123 and outputs the encrypted value of the string. The encrypted value will vary from system to system due to differences in the encryption key.

System Data Type
Get Started with AL
Developing Extensions