PHP code example of dmamontov / rsacrypt
1. Go to this page and download the library: Download dmamontov/rsacrypt library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dmamontov / rsacrypt example snippets
$crypt = new RsaCrypt;
$crypt->genKeys(2048);
$crypt->setPublicKey('public.pem');
$crypt->setPrivateKey('private.pem');
$data = $crypt->encrypt("Test Crypt");
echo $data;
echo $crypt->decrypt($data);