dhairya0907 / react-native-encryption

Encryption/Decryption for React Native
https://www.npmjs.com/package/@dhairyasharma/react-native-encryption
MIT License
7 stars 3 forks source link

TypeError: Cannot read property 'encryptFile' of null #5

Closed ngdph closed 1 year ago

ngdph commented 1 year ago

Describe the bug Hi, I ran into a problem like the title, I logged the RNEncryptionModule and the result was null.

To Reproduce Import import RNEncryptionModule from '@dhairyasharma/react-native-encryption';

Use it await RNEncryptionModule.encryptFile(file.fileCopyUri, outputPath, hexKey); The file.fileCopyUri, outputPath and hexKey are all strings represent input file path, output file path and the key to encrypt.

Expected behavior The file is encrypted.

Screenshots image

I'm using React Native 0.70.3.

ngdph commented 1 year ago

I solved it by reinstalling the app.