function encrypt($id){ $id=serialize($id); $key="1112121212121212121212"; $data['iv']=base64_encode(substr('fdakinel;injajdji',0,16)); $data['value']=openssl_encrypt($id, 'AES-256-CBC',$key,0,base64_decode($data['iv'])); $encrypt=base64_encode(json_encode($data)); return $encrypt; }
php实现基于openssl的加密解密方法
内容版权声明:除非注明,否则皆为本站原创文章。
转载注明出处:https://www.heiqu.com/c42fbfab591942a4fcf78db7c3f32c57.html