Readium Android SDK - Does anyone edit the code of epub3-Library?

1.4k views Asked by At

I am working on epub reader and get to know about "Readium Android SDK" which is used to read epub files. These epub files are stored at the specific path of device sdcard.

Now the requirements are: currently we are saving the epub files at the specific path. but now these files are encrypted files and stored at sdcard. Now firstly I need to decrypt that file internally so that there should not be any security flaw.

Suggest something.

1

There are 1 answers

0
mwu On

Readium on Android receives a file path to the openBook call. You basically have two options:

  1. Decrypt the encrypted ePub to a temporary file and use that temporary file's path as the path to the openBook method. Remove the temporary file when the viewer exits.
  2. Alter the Readium library to be able to receive the ePub archive as a data buffer. You can then do the decryption in memory. Doing this has some problems. One is that an ePub might be too large for a mobile device to hold in memory (if there are lots of images or video embedded within it). The other being that you would have to alter Readium to add a method for opening an in-memory book and expose that back to Java via the NDK.