PHP code example of eminmuhammadi / hidemydata
1. Go to this page and download the library: Download eminmuhammadi/hidemydata 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/ */
eminmuhammadi / hidemydata example snippets
= 'HideMyData';
$algo = 'aes256';
try {
$hider = (new eminmuhammadi\HideMyData\HideMyData('public-key', 'secret-key', $algo));
$data = $hider->encrypt($text);
print($data);
}
catch (Exception $e) {
print($e);
}
= 'KzdOWXBBWDNWSElWWm1VUkprenBFZz09';
$algo = 'aes256';
try {
$hider = (new eminmuhammadi\HideMyData\HideMyData('public-key', 'secret-key', $algo));
$data = $hider->decrypt($text);
print($data);
}
catch (Exception $e) {
print($e);
}
= 'HideMyData';
$algo = 'aes256';
try {
$hider = (new eminmuhammadi\HideMyData\HideMyData('public-key', 'secret-key', $algo));
/**
* @example $date - {5 second} , { 5 minute } , { 5 day } , { 5 month } , { 5 year }
*/
$data = $hider->encrypt($text,'1 minute');
print($data);
}
catch (Exception $e) {
print($e);
}
= 'QTRmOGpVMml6MDNVVG5IWERDblgzcFpzSE5oRHNYalVuT1NBV2w1UXB2clEyY2hRalVZbTVkL2ZJUjQ4MjNCT0RVUUZDb0NodGFCOTU2czVtUzNBMVU3eFhRRlM4cnhINmliWmRBY0I0eVo2dXdiaHY1bWxBWC85Y1piWUV4Qys=';
$algo = 'aes256';
try {
$hider = (new eminmuhammadi\HideMyData\HideMyData('public-key', 'secret-key', $algo));
/**
* @example $date - {5 second} , { 5 minute } , { 5 day } , { 5 month } , { 5 year }
*/
$data = $hider->decrypt($text,'1 minute');
print($data);
}
/**
* Need to say error because of old data
*/
catch (Exception $e) {
print($e);
}