Decrypt3DES Function

Action

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

Include file

kernel.bdh

Syntax

Decrypt3DES( in sEncryptedData : string,
             in sKey1 : string optional, 
             in sKey2 : string optional,
             in sKey3 : string optional ): string;

Return value

  • decrypted string

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

Example

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