local security = require("security")
local cipher = { 
    type = "aes", 
    key = "StringKeyStringK", 
    mode = "ofb"
} --string key (size 16 bytes) and empty initialization vector
local decrypted_data = security.decrypt( cipher, "data for decryption" )				
			
				
					local security = require("security")
local cipher = { 
    key = "\x17\xC6\x3C\x37\xDE\x19\xCF\x00\x6A\xC9\x15\x1A\x00\x3C\x78\x43", 
    mode = "cbc" 
} --binary key (size 16 bytes) and empty initialization vector
local decrypted_data = security.decrypt( cipher, "data for decryption" )				
			
				
					local security = require("security")
local cipher = { 
    key = "\x09\x76\x28\x34\x3f\xe9\x9e\x23\x76\x5c\x15\x13\xac\xcf\x8b\x02", 
    iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28\xdd\xb3\xba\x69\x5a\x2e\x6f\x58" 
} --binary key (size 16 bytes) and binary initialization vector
local decrypted_data = security.decrypt( cipher, "data for decryption" )				
			
				
					local security = require("security")
local cipher = { 
    key = "\x17\xC6\x3C\x37\xDE\x19\xCF\x00\x6A\xC9\x15\x1A\x00\x3C\x78\x43", 
    iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
    auto_padding = false
} --disabled auto padding
--encrypted data is 32 bytes. It's multiple of 16
local encrypted_data = "\xcf\xa5t\x05H\xd5\x8d\c\xf0N\x18t\xa3\xce\x90\xe4Hy\xa7[\x08\xab\xde5/NR\x91'P\x06";
local decrypted_data = security.decrypt( cipher, encrypted_data )