What is the replacement of GlideChecksum in scoped applications?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2015 04:31 AM
How can I calculate md5 checksum in ServiceNow?
var chsum = new GlideChecksum("mystring");
gs.info(chsum.getMD5());
GlideChecksum is not allowed in scoped applications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2015 12:44 AM
Hi Andriy,
There is no replacement for GlideChecksum in Scoped Applications at this time. You can open an Enchancement Request on Hi to request that a scoped version be made available in a future release.
In the mean time, there are several Javascript MD5 hash generators. You can import one as a Script Include in your Scoped App, and use it in place of GlideChecksum.
https://stackoverflow.com/questions/14733374/how-to-generate-md5-file-hash-on-javascript
https://stackoverflow.com/questions/1655769/fastest-md5-implementation-in-javascript
https://stackoverflow.com/questions/6818214/erlang-and-javascript-md5-digest-match
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2015 01:24 AM
Thanks Cory.
You can import one as a Script Include in your Scoped App, and use it in place of GlideChecksum.
This is what I actually did. But I would like to rely on SN built-in solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2020 03:32 PM
You can use GlideDigest which works in scoped apps:
var digest = new GlideDigest();
gs.info(digest.getMD5Hex('Hello'));