how to decode MD5 encrypted string?

Sumit35
Tera Contributor

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
7 REPLIES 7

Arnoud Kooi
ServiceNow Employee
ServiceNow Employee

MD5 is a hashing algorithm, not meant for encrypting and decrypring. For that purpose use GlideEncryptor API

 

 

Thanks Arnoud...!

 

My client is asking to use MD5 for rest integration. I am aware of REST integration but not aware using MD5.

Can you please help me here ? any sample document is highly appreciated ..

Arnoud Kooi
ServiceNow Employee
ServiceNow Employee

You should ask client to clarify the requirement, as stated in my first response endode a string to MD5 not decrypt to get the original message.

Thanks for your quick response...!

My Client requirement is about using MD5 for authentication. Client as rest API configured in some other tool.

We need to bring data from other tool to servicenow using get method. Fot GET method he wants to use MD5 authentication.

 

Can you please suggest any approach for this requirement ?

 

Regards,

Sumit