crypto.createHmac() is not a function (need to rewrute the same code in CryptoJS I guess


This Content is from Stack Overflow. Question asked by Eugene1111

hi I’m in react and have such lines of code that says it’s not a function

const signature = crypto
            .createHmac('sha256', apiSecret)
            .update('GET/realtime' + expires)

So I think I should use the crypto JS module or idk, I just can’t find the working combination. Even if I find smth lookalike, the connection still can’t be authorized. Could anyone help? Thank you


Check the Answers

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?