PHP code example of arzzen / php-time-lock-encryption
1. Go to this page and download the library: Download arzzen/php-time-lock-encryption 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/ */
arzzen / php-time-lock-encryption example snippets
use TimeLockCrypt;
$timeLock = new TimeLockCrypt('keyseed');
$message = 'secret message';
$encrypted = $timeLock->encrypt('+10 second', $message);
$iterations = $timeLock->getIterations();
$decrypted = $timeLock->decrypt($encrypted, $iterations);
var_dump($message == $decrypted);
json
{
"rzzen/php-time-lock-encryption": "1.1.*"
}
}