Encrypts string or binary data into a printable format using RSA’s RC4 cipher. This function is useful for encrypting passwords and other sensitive data.
kernel.bdh
Encrypt( 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 := Encrypt(sUserPass); Print(sEncrypted); sUserPass := Decrypt(sEncrypted); Print("decrypted password: " + sUserPass); end TMain;