Reading Lcpl Files in a Web-Based Environment

I'm new to Readium and am currently working on a project where I need to protect various media types, including EPUB, PDF, video, and audio files. These media files are intended to be accessed via a web-based platform. Someone told me that Readium might be the solution I'm looking for.

Here's what I've done so far with the LCP servers:

  1. I encrypted my EPUB file using the following command:
./lcpencrypt -input "sample1.epub" -lcpsv "" -login "sepuh" -password 'sungkem123'

(Note: This notifies the LCP server.)

  1. Then, I generated a license using:
curl -X POST -u sepuh:sungkem123 --header "Content-Type:application/json" \
-d '{
    "provider": "",
    "user": {
        "id": "dcb4adeb-fd82-4c16-9849-c269c12f1ae9",
        "email": "[email protected]",
        "kode_materi": 31337,
        "encrypted": [
            "email"
        ]
    },
    "encryption": {
        "user_key": {
            "text_hint": "The title of the first book you ever read",
            "hex_value": "4981AA0A50D563040519E9032B5D74367B1D129E239A1BA82667A57333866494"
        }
    },
    "rights": {
        "print": 1,
        "copy": 0
    }
}' \
-o puhsepuh.lcpl -J -v -D - 
  1. I tested the resulting .lcpl file with Thorium, and it worked perfectly.

Given the above, I have a couple of questions:

  1. How can I read the .lcpl file in a web-based environment?
  2. How can I use Readium to handle other media types such as video, audio, and PDF files?

I would greatly appreciate any guidance or assistance. Thank you in advance!

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article