GlideEncrypter in scoped app?

brycegodfrey
Kilo Contributor

What is the replacement for GlideEncrypter in a scoped application?   I need to encrypt/decrypt a password2 field on one of my tables.

5 REPLIES 5

Shane38
Tera Expert

Hi All

 I found a workaround for this issue:

Create a new script include in the global context that takes your string value as a parameter and then use GlideEncrypter to do the work for you inside the script include function. You then return the the encrypted value to your calling script. In order to call the new include from a scope application script you can use similar to the following:

var encryptmypwd = new global.myEncrypterInclude(); //Note the global prefix
var encryptedpwd = encryptmypwd.encryptPwd("myrandompasswordstring");

 

encryptPwd above is the function inside my new script include that uses GlideEncrypter to encrypt for me.

 

Hope this helps somebody

 

Shane