HMACSHA1 key encryption issue
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2023 03:28 AM
Hi Community,
We are facing issue in one of integration we are doing Servicenow with third party,
We need to hash the key using key and body,
we have used below code to hash but everytime we are getting error as "hash value what we got cannot be converted to byte array"
var body = "sample_data";//sample data
var mac = new GlideCertificateEncryption();
var key = "key";
var key = GlideStringUtil.base64Encode(key);
var hash = mac.generateMac(key, 'HmacSHA1',body);
Please anyone help us to solve this issue
0 REPLIES 0