DecryptAES Function

Action

Decrypts a string that has been encrypted using the EncryptAES function.

Include file

kernel.bdh

Syntax

DecryptAES( in sEncryptedData : string,
            in sKey : string optional ): string;

Return value

  • decrypted string

Parameter Description
sEncryptedData Data to be decrypted.
sKey1 String or binary data used as encryption key (optional).

Example

dcltrans
  transaction TMain
  var
    sUserPass  : string;
    sEncrypted : string;
  begin
    // Build your own authentication header
    AttributeGetString("Password", sUserPass);
    sEncrypted := EncryptAES(sUserPass);
    Print(sEncrypted);
    sUserPass := DecryptAES(sEncrypted);
    Print("decrypted password: " + sUserPass);
  end TMain;