title: Php file encryption methods. Does something simple exist?
body: <p>It's seems that there isn't any pleasant way to encrypt a file in php.</p>
  
  <p>The built in methods of php, mcrypt, aren't very portable as most servers don't support them.</p>
  
  <p>Command line encryption tools are like ugly hacks.</p>
  
  <p>There's encryption for strings which is nice, but if we want to encrypt a file it doesn't help very much especially for someone else to unencrypt it.</p>
  
  <p>Other encryption tools require public keys, key rings, private keys, blood sample... These seem much too complicated for just encrypting a file.</p>
  
  <p>It seems that we should just have a simple function for PHP that could work like so:</p>
  
  <pre><code>$crypt = new Crypt();
  $crypt-&gt;encryptFile("Password1245!", 'secret_file.txt', 'encrypted_file.txt');
  $crypt-&gt;decryptFile("Password1245!", 'encrypted_file.txt', 'original_file.txt');
  </code></pre>
  
  <p>Any one have any ideas? I'm pulling out hair!</p>
  
  <p>EDIT:
  Another thing I should add, for the end user to be able to decrypt the file with ease. </p>
  
  <p><strong>Basically I'm trying to find something that can replace a password protected zip file</strong></p>