<?php
function encode($txt){
    $cipher = "aes-256-cbc"; 
    $secretKey = "DVy2NQm;ZCr5K(3aW<";
    $iv = hex2bin(md5("e8e381c01ee94a81f1e92bb3711e2d0a"));
    $hasil = openssl_encrypt($txt, $cipher, $secretKey, 0, $iv);
    return $hasil;
}

function decode($txt){
    $cipher = "aes-256-cbc"; 
    $secretKey = "DVy2NQm;ZCr5K(3aW<";
    $iv = hex2bin(md5("e8e381c01ee94a81f1e92bb3711e2d0a"));
    $hasil = openssl_decrypt($txt, $cipher, $secretKey, 0, $iv);
    return $hasil;
}

$encryptedText = "+0soAuqf5ByrYzJd/8MMDw==";
$decryptedText = decode($encryptedText);
echo "Decrypted text: " . $decryptedText;
?>
