Skip to content

Instantly share code, notes, and snippets.

@freretuc
Created May 2, 2015 15:49
Show Gist options
  • Save freretuc/82bb14dccf3643a962c3 to your computer and use it in GitHub Desktop.
Save freretuc/82bb14dccf3643a962c3 to your computer and use it in GitHub Desktop.
Decrypting string with php
<?php
$private = file_get_contents("private.pem");
$data = base64_decode("base64-crypted-string");
openssl_private_decrypt($data, $content, $private, OPENSSL_PKCS1_OAEP_PADDING);
echo $content;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment