Trying to generate a hash of a HMAC Sring in Salesforce. The hash generated using APEX in Salesforce is not identical when compared to a hash generated by JS code on the same message. Am I doing anything wrong, please help
let hmac = crypto.createHmac("sha256", 'KEY_HASH');
hmac.update('some string');
let hash = hmac.digest('hex');
Generated Digest/Hash: d3db519bb2c64dd3777be06f970d6d8533a1e3b1d5d6b9fa4b945ec27cea8e4d
Blob blobHMAC = Crypto.generateMac('hmacSHA256', Blob.valueOf('some string'), Blob.valueOf(keyHash));
Blob hash = Crypto.generateDigest('SHA-256', blobHMAC);a
EncodingUtil.convertToHex(hash);
Generated Digest/Hash: d02debb0549e98cc71eb8ec55b1abb62d524de3742c908703d5654324fedd732