AES对称加密简单实例
作者:互联网
header("content-type:text/html;charset=utf-8"); // 要加密的字符串 $data = '张三'; // 密钥 $key = '123456'; // 加密数据 'AES-128-ECB' 可以通过openssl_get_cipher_methods()获取 $encrypt = openssl_encrypt($data, 'AES-192-ECB', $key, 0); echo (($encrypt)); echo "<hr/>"; // 解密数据 $decrypt = openssl_decrypt($encrypt, 'AES-192-ECB', $key, 0); echo $decrypt; die;
标签:AES,encrypt,ECB,decrypt,echo,实例,key,加密 来源: https://www.cnblogs.com/wjs2019/p/16179782.html