当前位置:网站首页>PHP AES加密解密
PHP AES加密解密
2022-04-22 17:08:00 【shaobohong】
$method = 'AES-128-ECB';//加密方式,大写
$key = '123456';//秘钥
$data = 'mydata';
$encryptData = base64_encode(openssl_encrypt($data, $method, $key, 1));
$decryptData = openssl_decrypt(base64_decode($data), $method, $key, 1);
//注意第4个参数,默认值是1,但是必须要显示传参,否则会返回false
版权声明
本文为[shaobohong]所创,转载请带上原文链接,感谢
https://blog.csdn.net/qq_17613195/article/details/105727759
边栏推荐
- Devaxpress WPF Getting Started Guide - POCO view model generated at runtime (I)
- leetcode:451. 根据字符出现频率排序
- swagger Authorization测试
- SaaS 长河下,AfterShip 技术升级的“加减法”
- Which financial product has high income on May Day?
- 全网征集!说说你跟宜搭之间的故事吧
- MySQL of fighting spirit and courage
- 在文件夹中查找字符串
- [句型] 二十四、特殊疑问句
- JS to get the first character of Chinese characters
猜你喜欢

全网征集!说说你跟宜搭之间的故事吧

400 million women just need, all kinds of capital kill: 100 billion business hidden in sanitary napkins

运维自动化之ansible--(playbook模式)
![[distributed project] certification service center, social login oauth2 0. Single sign on and distributed session solutions](/img/b5/c4fb21101a8d4b83de760d0feda296.png)
[distributed project] certification service center, social login oauth2 0. Single sign on and distributed session solutions

Cognitive series 4: Notes on cognitive breakthrough

VSCode 最全实用插件(VIP典藏版)

swagger Authorization测试

Your password does not satisfy the current policy requirements

SDN学习之Opendaylight浅析(一)
How can we make the calendar note of win10 computer display 24 solar terms?
随机推荐
How does glboalmapper20 convert hundreds of longitude and latitude projected images into national 2000 or other projected images at one time
Redis(16) -- Redis集群
The [ANSYS Workbench] mechanical interface displays the model tree window and the details window
[sentence pattern] 24. Special questions
[filtering and convolution (III)]
Update description of the latest process engine flowable 6.7.2
"Addition and subtraction" of aftership technology upgrading under the long river of SaaS
Practice questions and answers of evaluation technical methods in 2022 environmental impact assessment engineer examination
SDN学习之Opendaylight浅析(二)
Triple pressure of Xiaoxiong electric appliance: expansion, inventory and competitors
MySQL笔记(基础篇)
Introduction and expansion of dichotomy
4亿女性刚需,各路资本杀伐:藏在卫生巾里的1000亿生意
Leetcode problem brushing plan -- monotonic sequence
GlobalMapper20 如何批量的把shp转为kml并带上属性
Cognitive series 4: Notes on cognitive breakthrough
webrtc入门:4.RTCPeerConnection连接音视频流
Shiro cache management
KNN and K-means from introduction to actual combat
Bisect -- insert new data into the list and keep it in order