ghbutton / react-native-simple-crypto

A simpler React-Native crypto library
https://www.npmjs.com/package/react-native-simple-crypto
MIT License
42 stars 25 forks source link

Cannot read property 'sha1' of undefined #12

Closed almorak closed 4 years ago

almorak commented 5 years ago

"react": "16.6.3", "react-native": "0.58.5", "react-native-sha512": "^1.0.2",

It shows the Warning: TypeError: Cannot read property 'sha1' of undefined

my code: static async encrypt_pw(_password){ let sha512_pw = await RNSimpleCrypto.SHA.sha1(_password); return sha512_pw; }

when I logged the RNSimpleCrypto: { AES: {encrypt: ƒ, decrypt: ƒ} HMAC: {hmac256: ƒ} PBKDF2: {hash: ƒ} RSA: undefined SHA: undefined utils: {randomBytes: ƒ, convertArrayBufferToUtf8: ƒ, convertUtf8ToArrayBuffer: ƒ, convertArrayBufferToBase64: ƒ, convertBase64ToArrayBuffer: ƒ, …} }

ghbutton commented 4 years ago

is this iOS or Android? Please try with the latest version

ghbutton commented 4 years ago

Going to close, please reopen if there is still an issue