imchintan / react-native-crypto-js

CryptoJS is a growing collection of standard and secure cryptographic algorithms implemented in JavaScript using best practices and patterns. They are fast, and they have a consistent and simple interface.
MIT License
39 stars 22 forks source link

HmacMD5 TypeError: Cannot read property 'init' of undefined #3

Open naxel opened 5 years ago

naxel commented 5 years ago

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

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

imchintan commented 5 years ago

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

naxel commented 5 years ago

"react-native": "0.58.4"

Todmy commented 4 years ago

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