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.
Asked
Active
Viewed 1.2k times
5
-
It's not at all clear what you're asking here. What do you need to do? How does it need to be encrypted? – Wouter Verhelst Feb 16 '16 at 07:37
-
i want to encrypt video file that no one can access it from the outside the app. and after the downloading it only play in the app. – Prateek Negi Feb 16 '16 at 07:40
-
1Welcome to SO. This is not a code-request site. Nor a tutorial place. – Phantômaxx Feb 16 '16 at 07:48
1 Answers
12
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

Abdul Rehman
- 2,313
- 2
- 15
- 14
-
I need to decrypt on demand like in live video streaming, do you have a hint? – Duna Dec 23 '20 at 11:54