Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to encrypt string in servicenow

sajan0192
Giga Expert

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

 

 

 

1 ACCEPTED SOLUTION

sajan0192
Giga Expert

I have used below code for my req

 

var mac = new GlideCertificateEncryption;

mac.generateMac("sample_key", "HmacSHA256", "sample_data");

 

Thanks,

Sajan

View solution in original post

5 REPLIES 5

@sajan0192 Were you able to generate HMAC token? What was passed as sample_data parameter?