Encrypt a string (string.aes128_encrypt)
Deprecated: This function is kept only for compatibility with existing scripts. For new scripts, use lua-openssl and choose an algorithm such as
aes-128-ecboraes-128-gcm.
Declaration
encrypted = string.aes128_encrypt(data, key)
Parameters
- data
string. The original string (or binary data) to encrypt. - key
string. The password.
Returns
- encrypted
string. Encrypted binary data.
Description
Encrypt a string (or binary data) using AES128 algorithm in ECB mode.
Note: AES128 ECB mode has no iv (initialization vector). If an integration requires an iv field, use 0.