Encrypts string or binary data into a printable format using the Triple Data Encryption Algorithm (Triple DES) block cipher. This function is useful for encrypting passwords and other sensitive data.
kernel.bdh
Encrypt3DES( in sData : string, in sKey1 : string optional, in sKey2 : string optional, in sKey3 : string optional ): string;
encrypted string
Parameter | Description |
---|---|
sData | String or binary data to be encrypted |
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). |
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;