Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear
<?php function my_encrypt_openssl() { $str = 'P3LMJ4uCbkFJ/RarywrCvA=='; $str = str_replace(array("\r\n", "\r", "\n"), "", $str); $key = 'PanGuShi'; $iv = substr(sha1($key), 0, 16); $decode = base64_decode($str); $dencrypted = openssl_decrypt($decode, 'AES-128-CBC', $key, 0, $iv); $dencrypted = trim($dencrypted); return $dencrypted; } // 调用函数并输出结果 echo my_encrypt_openssl(); ?>

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php function my_encrypt_openssl() { $str = 'P3LMJ4uCbkFJ/RarywrCvA=='; $str = str_replace(array("\r\n", "\r", "\n"), "", $str); $key = 'PanGuShi'; $iv = substr(sha1($key), 0, 16); $decode = base64_decode($str); $dencrypted = openssl_decrypt($decode, 'AES-128-CBC', $key, 0, $iv); $dencrypted = trim($dencrypted); return $dencrypted; } // 调用函数并输出结果 echo my_encrypt_openssl(); ?>
Copy Clear