($algorithm);
$iv = openssl_random_pseudo_bytes($ivlen);
$password = openssl_encrypt($data, $algorithm..., $algorithm, $key, 0, $iv), PHP_EOL;
// 测试对称加密
// Warning: openssl_encrypt(): Using an empty Initialization...Vector (iv) is potentially insecure and not recommended
openssl_encrypt() 就是加密数据,它需要原文、算法和密钥三个参数,后面的参数是可选的...iv 内容。...$algorithm = 'aes-128-gcm';
$password = openssl_encrypt($data, $algorithm, $key, 0, $iv, $tags);
echo