var key = CryptoJS.enc.Base64.parse("X5oh6AGsqo0s05Iz9h9DhDOHP3truufLJVgkWJbugGM="); var c = CryptoJS.HmacSHA256(JSON.stringify(data),key); console.log(CryptoJS.enc.Base64.stringify(c))