Created
June 9, 2017 07:05
-
-
Save eeertekin/f256665d6ef8b463d8e662477fbe5581 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
## Example in PHP | |
class Decryption | |
{ | |
public $privateKey = '{yourPrivateKey}'; | |
public function decrypt($data) | |
{ | |
if (openssl_private_decrypt(base64_decode($data), $decryptedData, $this->privateKey)) | |
return $decryptedData; | |
return "Decryption failed!"; | |
} | |
} | |
# For more details, you can check the openssl_private_decrypt function in PHP Manual. | |
# http://us.php.net/manual/en/function.openssl-private-decrypt.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment