<html>
<head>
<meta charset="UTF-8">
</head>
<body>

<?php
$string = "\x46\x6F\x6F\x20\xC2\xA9\x20\x62\x61\x72\x20\xF0\x9D\x8C\x86\x20\x62\x61\x7A\x20\xE2\x98\x83\x20\x71\x75\x78\x20\xED\x95\x9C\xEA\xB8\x80\xEC\x9D\x84\x20\xEC\x9E\x85\xEB\xA0\xA5\xED\x95\x98\xEC\x9E\x90";
echo $string;

$encryption_key = openssl_random_pseudo_bytes(32);
$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));

$encrypted = openssl_encrypt($string, 'aes-256-cbc', $encryption_key, 0, $iv);
$encrypted = $encrypted . ':' . $iv;
echo "<br>Encrypted: $encrypted<br>";
echo strlen($iv);

// To decrypt, separate the encrypted data from the initialization vector ($iv)
$parts = explode(':', $encrypted);
// $parts[0] = encrypted data
// $parts[1] = initialization vector

$decrypted = openssl_decrypt($parts[0], 'aes-256-cbc', $encryption_key, 0, $parts[1]);
echo "<br>Decrypted: $decrypted\n";

?>

<br>
Hello

</body>
</html>
