how to decode MD5 encrypted string?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2018 02:23 AM
how to decode MD5 encrypted string?
I have used below code to encrypt a string.
var inputString = "Her molasses flowed slowly down the hill."; var digest = new GlideDigest(); gs.info(digest.getMD5Base64(inputString));
Output:
SKdikyauk31LyQYS9KJ/gQ==
I want to get back the original string.
Please suggest the decode function for MD5 code.
Regards,
Sumit Jumale
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2018 03:43 AM
You should store the encrypted password in the database, when you compare the stored password string with the value in send via the rest API
Without the details and API stuff
this is the pseudocode how to check
if (digest.getMD5Base64(inputString) == "SKdikyauk31LyQYS9KJ/gQ=="){
//password correct
}
I do not have bandwith to give full code example, hope this gets you started, and you can mark the answer as correct.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2018 03:57 AM
We are using get method in REST outbound.
When send outbound message from ServiceNow to other tool, that time we need to user MD5.
so in this case , who should store the password in encrypted format. ServiceNow or Other tool?
if it needs to be stored in servicenow, then where are we using that password ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2018 04:07 AM
Based on the info you provide, the password at the "other" side is stored as MD5, you should just send the password as MD5 encoded. But refer to that API documentation, or get in contact with the admin of that API.