How to enable Service Now encrypt certificate hash in SHA256

richam
Tera Expert

Hi All,

We have a SOAP integration in place which requires source to use certificate and generate signature in sha 256 ,currently it generates in SHA1. Is there some configuration that needs to be done so SNOW automatically encrypt in sha256?.

Thanks,

Richa

2 REPLIES 2

JK1
Giga Expert

Hi Richa,

create script include and use the code from here - https://github.com/h2non/jshashes/blob/master/hashes.js 

Then you can easily encrypt, hash, etc. with any algorithm. I use it for HMAC SHA256 for ex. : 

 new Hashes.SHA256().b64_hmac(newKey, date); 

 

Let me know if you have questions.

Cheers,

 

Joro

kmohammed1
Tera Contributor

@JK1 I'm trying to do that but my hashed result is not matching with the expected result. Can you please suggest?

In my script which is working in postman i'm using the CryptoJS so that it's working fine for SHA256Hmac.

But in the script include hashes mentioned above in the read me document i can see that it uses only b_64 or hex hmac. I'm new to these concepts can you help me?