- $key = 'SK7381DNSU#&#@DS'; //key 的长度保持 16 位 加粗 标识
- $cipher = "AES-128-ECB";
- $iv_len = openssl_cipher_iv_length($cipher);
- $iv = openssl_random_pseudo_bytes($iv_len);
- $encrypt_data = openssl_encrypt(json_encode($response), $cipher, $key, $options = 0, $iv, $tag); // 加密后自带 base64_encode 切勿重复 encode
- php7 AES IOS Android
来源: http://www.bubuko.com/infodetail-2735520.html