title: convert .key to .pem
body: <p>I need to encrypt with private key and I'm attempting to do so with the following code:</p>
  
  <pre><code>$content = file_get_contents("file.key");
  
  $plaintext = "14d9df79-8c4c-4380-8444-d31e1fd3f78a";
  
  openssl_private_encrypt($plaintext, $encrypted, $content);
  
  $transfer = base64_encode($encrypted);
  
  echo "text encrypted is:" . $transfer;  //encrypted string
  </code></pre>
  
  <p>I'm getting the error:
  openssl_private_encrypt(): key param is not a valid private key in</p>
  
  <p>Do I have to do something to the key file? It is binary.</p>