1. Go to this page and download the library: Download temant/encryption-manager 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/ */
temant / encryption-manager example snippets
use Temant\EncryptionManager\EncryptionManager;
use Temant\EncryptionManager\EncryptionTypeEnum;
// Initialize the Encryption class with a key
$encryption = new EncryptionManager('your-encryption-key', EncryptionTypeEnum::BYTES_256);
// Encrypt a string
$plainText = 'Hello, World!';
$encrypted = $encryption->encryptString($plainText);
// Decrypt the string
$decrypted = $encryption->decryptString($encrypted);
echo "Encrypted: $encrypted\n";
echo "Decrypted: $decrypted\n";