1. Go to this page and download the library: Download atk14/packer 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/ */
// Option A: define a constant (e.g. in bootstrap)
define("PACKER_CONSTANT_SECRET_SALT", "your-secret-here");
// Option B: set at runtime (can be changed per request)
Packer::SetSalt("your-secret-here");
define("PACKER_CONSTANT_SECRET_SALT", "your-secret-here");
$packed = Packer::Pack($data, ["enable_encryption" => true]);
if (Packer::Unpack($packed, $data, ["enable_encryption" => true])) {
// ok
}