tradle / rn-nodeify

hack to allow react-native projects to use node core modules, and npm modules that use them
MIT License
614 stars 114 forks source link

Cannot read property 'call' of undefined when calling createHmac function from crypto #127

Open anis-18 opened 1 year ago

anis-18 commented 1 year ago

I'm running the following code:

    const HMACKey = Buffer.from(hmacKeyBase64, 'base64');
    const HMAC = createHmac('sha256', HMACKey);
    HMAC.update(value);
    return HMAC.digest('hex');

and i'm getting this error

Cannot read property 'call' of undefined 

please take a look at the image for further information about the error

Screenshot_2023-01-13-10-31-56-662_com touristpass2_0