Encrypts string or binary data into a printable format using the Advanced Encryption Standard (AES) block cipher. This function is useful for encrypting passwords and other sensitive data.
kernel.bdh
EncryptAES( in sData : string, in sKey : string optional ): string;
encrypted string
Parameter | Description |
---|---|
sData | String or binary data to be encrypted |
sKey | String or binary data used as encryption key (optional). |
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;