728x90
반응형
<?
$iv = '8746376827619797';
$key = "40ea168bdf014de783fb9a6640448bff";
function encrypt($original_string, $crypt_key, $crypt_iv) {
$option = 0;
$cipher_algo = "AES-256-ECB";
return openssl_encrypt($original_string, $cipher_algo, $crypt_key, $option, $crypt_iv);
}
function decrypt($encrypted_string, $crypt_key, $crypt_iv) {
$option = 0;
$cipher_algo = "AES-256-ECB";
$decrypted_string = openssl_decrypt ($encrypted_string, $cipher_algo, $crypt_key, $option, $crypt_iv);
return substr($decrypted_string,16);
}
?>
반응형
댓글