<?php
$servername = "localhost";
$database = "centra17_dbcobakbb";
$username = "centra17_cobakbb";
$password = "cobakbbku12345";
 
$conn = mysqli_connect($servername, $username, $password, $database);
 
if (!$conn) {
    
    die("Connection failed: " . mysqli_connect_error());
 
}
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;
}
// echo "Connected successfully";

date_default_timezone_set('Asia/Jakarta');
$datetime_jakarta = new DateTime();
?>