4

I am making an app (with Phonegap Build, an extension of Apache Cordova), where you can download files. The problem is that the files can contain HIGHLY sensitive data. That's why I want to encrypt all the files when it is downloaded and stored on the device.

Problem 1

The file-transfer-plugin (https://github.com/apache/cordova-plugin-file-transfer) will download the files directly and will be stored on the device. If someone closes the app directly after, the file will still exist on the device.

Solutions:

  • Use the onPause event of the framework (if the app closes, delete all files in a special made directory). But will it be executed on a "hard" app exit?

Problem 2

After the files are downloaded, the files need to be encrypted. But, I can't find a good plugin that fully fulfill my needs. I really want to encrypt it, because on Android those high sensitive files can be stored on SD-cards.

Solutions:

Notes

  • I need a solution for iOS and Android.
  • Only personal private data will be retreived, so there will be no data stored of someone else.
  • The Cordova security guide (https://cordova.apache.org/docs/en/latest/guide/appdev/security/) is out of date (or not specified for file encryption yet). Does this mean that file encryption is still an ongoing process?

I hope someone have experience with file encryption for hybrid apps and can give me valuable advice for my problem. Thank you in advance!

Justin La France
  • 789
  • 8
  • 21
  • Hello , can you please give an example on how you used cordova-safe with fileURL image – Amr.Ayoub Mar 06 '17 at 12:08
  • Hi Buddy, me too looking for proper files path of localstorage path for my installed app https://stackoverflow.com/questions/46296791/how-to-decrypt-files-from-installed-apk-file-in-cordova-application – Sopo Oct 11 '17 at 13:24

0 Answers0