Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encryption and decryption of video file in android

Can anyone please tell me how to encrypt video file while downloading from the server and decrypt it while playing inside the app? please help. thank you.

like image 333
Prateek Negi Avatar asked Feb 16 '16 07:02

Prateek Negi


People also ask

How do I encrypt a video file?

Right-click (or press and hold) a file or folder and select Properties. Select the Advanced button and select the Encrypt contents to secure data check box. Select OK to close the Advanced Attributes window, select Apply, and then select OK.


1 Answers

Use CipherOutputStream and CipherInputStream for encryption and decryption of file in android.

There are two ways through which you can achieve your goal

Download a file and encrypt it, when you want to play that file decry-pt it in a temporary file and play it.

if you want to play encrypted file on the fly (not decrypting it in a temp file) then you can use Libmedia library. It streams encrypted file on local host and play it from there

like image 130
Abdul Rehman Avatar answered Sep 25 '22 06:09

Abdul Rehman