Lua Scripting Resources

Important Update to Custom Scripting

SurveyGizmo's CustomScript Action now supports the LUA programming language.


Legacy Custom Scripting Language Deprecation Plans 

  1. New accounts (created after October 29, 2018) will only have the option to use Lua in scripts.
  2. As of October 29, 2018 Custom Scripting Actions will default to Lua as the scripting type in the Custom Scripting Action for accounts created before this date. You will be able to switch to the Legacy Custom Scripting; though we highly encourage using Lua.
  3. In the long term, Legacy Custom Scripting Actions will be switched to read-only. Read-only scripts will continue to function; you will just be prevented from editing. The exact date on this is to be determined; we will send notifications well ahead of time.


 Go to our Legacy Scripting Documentation.

While SurveyGizmo is one of the most flexible survey tools around, we get requests for customizations that are not available out of the box. This is where JavaScript and Custom Scripting can save the day. If you have scripting chops you can use the JavaScript action or the Custom Scripting action to achieve the survey of your dreams.


[article("bodfy")]

Decrypts the given encrypted string.

ParametersDescriptionRequired
stringthe string you wish to decrypttrue
keythe string key/password used for encryption/decryptiontrue
ciphertypea string calling the cipher algorithm used by encryption and decryption. See the below table for more info or retrieve the list of supported hashing algorithms using luacipher().true
ivthe string initialization vector for encryption/decryption. It has to be of correct size (usually block size), otherwise the functions return an error.true

The below table covers all available cipher types and their associated initialization vector size. You can also run luacipher() to see the latest list of cipher types.

CipherType Possible ValuesIV
aes-128-cbc16
aes-128-cbc-hmac-sha116
aes-128-cbc-hmac-sha25616
aes-128-cfb16
aes-128-cfb116
aes-128-cfb816
aes-128-ctr16
aes-128-ofb16
aes-128-xts16
aes-192-cbc16
aes-192-cfb16
aes-192-cfb116
aes-192-cfb816
aes-192-ctr16
aes-192-ofb16
aes-256-cbc16
aes-256-cbc-hmac-sha116
aes-256-cbc-hmac-sha25616
aes-256-cfb16
aes-256-cfb116
aes-256-cfb816
aes-256-ctr16
aes-256-ofb16
aes-256-xts16
aes12816
aes19216
aes25616
bf8
bf-cbc8
bf-cfb8
bf-ofb8
blowfish8
camellia-128-cbc16
camellia-128-cfb16
camellia-128-cfb116
camellia-128-cfb816
camellia-128-ofb16
camellia-192-cbc16
camellia-192-cfb16
camellia-192-cfb116
camellia-192-cfb816
camellia-192-ofb16
camellia-256-cbc16
camellia-256-cfb16
camellia-256-cfb116
camellia-256-cfb816
camellia-256-ofb16
camellia12816
camellia19216
camellia25616
cast8
cast-cbc8
cast5-cbc8
cast5-cfb8
cast5-ofb8
idea8
idea-cbc8
idea-cfb8
idea-ofb8
rc58
rc5-cbc8
rc5-cfb8
rc5-ofb8
seed16
seed-cbc16
seed-cfb16
seed-ofb16

Example

In the below example we decrypt an encrypted string.

cipherType = 'blowfish'

luadecrypt(encryptedstring,'thisismykey',cipherType,'12345678')