扫码关注官方订阅号
官网有警告说:This function has been DEPRECATED as of PHP 7.1.0. Relying on this function is highly discouraged.
那么加密解密用什么函数呢?
人生最曼妙的风景,竟是内心的淡定与从容!
openssl_encryptopenssl_decrypt
>>> openssl_encrypt("1", "aes-256-cbc", "12312321", 0, "1234123443212345"); => "x6Zfu2cbtbMDfkt2s/GE2A==" >>> openssl_decrypt("x6Zfu2cbtbMDfkt2s/GE2A==", "aes-256-cbc", "12312321", 0, "1234123443212345"); => "1"
另可参阅 How do you Encrypt and Decrypt a PHP String?
password_hashpassword_verify
hash加密呢?
非对称加密, RSA。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
openssl_encrypt
openssl_decrypt
另可参阅 How do you Encrypt and Decrypt a PHP String?
password_hash
password_verify
hash加密呢?
非对称加密, RSA。