title: Simple but fast binary file de/encryption using PHP
body: <p>I need to implement a simple (not ultra-secure) but fast file en/decryption using PHP, so files are encrypted on upload and decrypted on download. Files are mainly images (jpg) and videos (mp4), and some videos are up to 30 MB, so my idea is to encrypt only the first X bytes of each file, just to avoid anyone that could have access to the server (ie. support people) to open the files from users.</p>
  
  <p>I am new to this subject and after almost 6 hours researching found only old examples, using deprecated Mcrypt.</p>
  
  <p>Please, can anyone give me tips to start? Is there any native method from PHP that I can use, or maybe an open-source library? Does Mcrypt would be an option, even if deprecated (I am using PHP 5.6). Do you think encrypting only the first X bytes of the file is a good approach in my case?</p>
  
  <p>Thanks!</p>