react-native-crypto-js icon indicating copy to clipboard operation
react-native-crypto-js copied to clipboard

HmacMD5 TypeError: Cannot read property 'init' of undefined

Open naxel opened this issue 5 years ago • 3 comments

CryptoJS.HmacMD5('text', 'pass')

TypeError: Cannot read property 'init' of undefined at Object.HmacMD5 ...

naxel avatar May 01 '19 17:05 naxel

@naxel Thanks for reporting issues. Can you please provide the detail of React Native version?

imchintan avatar May 24 '19 09:05 imchintan

"react-native": "0.58.4"

naxel avatar May 24 '19 10:05 naxel

Any update on it? Have the same issue.

"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz", // react-native expo build

It is hard to read obfuscated code but looks like there some issue with the code or your obfuscation tool. You can pay attention to the line

for(var t=CryptoJS,r=t.lib,w=r.WordArray,v=r.Hasher,r=t.algo,b=[],x=0;64>x;x++)

Also I cannot find in the code where HMAC assigned to algo

Todmy avatar Apr 02 '20 09:04 Todmy