GlideEncrypter in scoped app?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2015 11:21 AM
What is the replacement for GlideEncrypter in a scoped application? I need to encrypt/decrypt a password2 field on one of my tables.
- 7,975 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2019 11:22 PM
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