Using AES encryption

Verified
Added by iNTERFACEWARE

How to encode and decode strings with AES, using filter.aes.enc{} and filter.aes.dec{}

Source Code
-- encode string using aes
local Enc = filter.aes.enc{data='hello world',key='this is a 32 byte shared aes key'}
trace(Enc)
   
-- decode aes encrypted string
local Dec = filter.aes.dec{data=Enc,key='this is a 32 byte shared aes key'}
trace(Dec)
Description
How to encode and decode strings with AES, using filter.aes.enc{} and filter.aes.dec{}
Usage Details

Demonstrates how to encode and decode strings with AES, by using filter.aes.enc{} and filter.aes.dec{}. AES encryption uses a shared encryption key, you will need to supply this to whoever needs to decrypt the file.

How to use the snippet:

  • Paste the code into your script
  • Inspect the annotations to see how it works