Skip to main content

Arguments

string
required
Base64 ciphertext decoded before decryption.
string
required
Base64 key decoded before it is passed to AES.
string
required
Base64 IV decoded before mode handling. This argument is required, including for ECB.
"CBC" | "ECB" | "AES-CBC" | "AES-ECB"
AES mode. The AES- prefix is removed when present. Defaults to AES-CBC.

Returns

string
Plaintext bytes returned as a Lua string.

Example

Decrypt ciphertext returned by crypt.encrypt using the returned IV.