How to play an encrypted Video or Audio file from a remote server or a local file on Android (Part 1)
<p>Playing an Audio or a Video file can become very challenging on Android when it comes to protecting the media content so that it can’t be reclaimed through the decompilation process. To tackle this issue, a widely used approach is leveraging <a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard" rel="noopener ugc nofollow" target="_blank"><em>Advanced Encryption Standard (AES)</em></a> Encryption Algorithms alongside a <em>private key </em>that is only shared between the server and the client.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*-S8Egd8zS-Lp-2cLCLIs2w.jpeg" style="height:350px; width:700px" /></p>
<p>In this article, I am going to elaborate on the essentials of how to play an encrypted file on Android using <a href="https://exoplayer.dev/" rel="noopener ugc nofollow" target="_blank"><strong>ExoPlayer</strong></a> from either a remote server or a local file. <em>However, the former will be discussed in </em><a href="https://medium.com/@s.m.mousavi1993/how-to-play-an-encrypted-video-or-audio-file-locally-or-from-a-remote-server-on-android-part-2-229476846d6c" rel="noopener"><strong><em>Part 2</em></strong></a><em> of this article.</em></p>
<p>Through this essay, I am using <em>Cipher</em> as the originally supported decryptor tool to decrypt an <em>AES/ECB/PKCS5Padding</em>-encrypted file. However, other standard AES encryption modes are supported as well with a slight difference.</p>
<p><a href="https://medium.com/@s.m.mousavi1993/how-to-play-an-aes-encrypted-audio-video-from-a-local-file-and-a-remote-server-on-android-part-1-c7a841daf0e0"><strong>Read More</strong></a></p>