<?php
$textToEncrypt = "3266";
$encryptionMethod = "aes-128-cbc";
$secretHash = "PYny9tcpR8KMilCybp4V";
$iv = "fgrgfvcfghtfdrfg";
$encryptedMessage = openssl_encrypt($textToEncrypt, $encryptionMethod, $secretHash, 0, $iv);
$encryptedMessage = str_replace(' ', '+', $encryptedMessage);
$encryptedMessage = str_replace(['/', '=', '+'], ['_', '', '*'], $encryptedMessage);
echo 'Token for zone ' . $textToEncrypt . ' is ' . $encryptedMessage;
preferences:
27.98 ms | 402 KiB | 5 Q