Search code examples
rubyencryptionopensslaeshttp-live-streaming

Open source AES-128 encryption for HLS?


Apple has some really nice tools to segmenting solid media files to HLS and adding AES-128 encryption. However, they only run on Mac's and thus aren't very useful in a typical cloud environment where the machines run on Linux.

I'm looking for any existing tools and libraries that will help in adding AES-128 encryption to pre-segmented HLS. I don't believe this would be super complicated to implement. I'd like to write it in Ruby. Does anyone know of any tools or resources that will help?


Solution

  • You can use the OpenSSL::Cipher class in Ruby. Since the OpenSSL extension is basically a wrapper for native OpenSSL, this is really fast.