- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 01:55 PM
I am using below code to encrypt string but it is not supported in service now I guess.
var encrypted = CryptoJS.AES.encrypt(myString, myPassword);
Is there any method encrypt the string in service now ?
Regards,
Sajan
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2018 01:20 PM
I have used below code for my req
var mac = new GlideCertificateEncryption;
mac.generateMac("sample_key", "HmacSHA256", "sample_data");
Thanks,
Sajan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 08:12 PM
Hi
Please use the below script, if may help you,
var enc = new GlideEncrypter();
var myPassword= "datapass";
var encypted_myPassword = enc.encrypt(myPassword);
gs.info(encypted_myPassword);
Please mark it correct, if it resolves your problem.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2018 04:22 AM
Hi Sajan,
Could you please mark it correct, if it resolved your problem.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2018 10:46 PM
Hi Sajan,
Please refer the example script given in link belo.
https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/GlideEncrypter/concept/GlideEncrypterAPI.html
Hope this helps.
Regards
Ujjawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2018 01:20 PM
I have used below code for my req
var mac = new GlideCertificateEncryption;
mac.generateMac("sample_key", "HmacSHA256", "sample_data");
Thanks,
Sajan