Skip to content

berry.encryption.AES256Encryption

Nikos Siatras edited this page Sep 30, 2022 · 13 revisions

berry.encryptionAES256Encryption

require_once(__DIR__ . "/berry/encryption.php"); // Include berry encryption package

$encryptionKey = "(s88(VGgQNfeY5z4^ED!M)6HzKyruNw("; // 32-bit ecnryption key
$stringToEncrypt = "Hello World!";

print "Original String: " . $stringToEncrypt."<br>";

$encryptedString = AES256Encryption::encrypt($encryptionKey,$stringToEncrypt);
print "Encrypted String: " . $encryptedString."<br>";

$descryptedString = AES256Encryption::decrypt($encryptionKey, $encryptedString);
print "Decrypted String: " . $descryptedString."<br>";
Clone this wiki locally