Using Triple DES(3DES) with PHP 7.1 [closed]

空扰寡人 提交于 2019-12-25 12:57:06

问题


I need a way to encrypt and decrypt with 3des. I'm currently using php 7.1

I found this question, but mcrypt is deprecated as of php 7.1 and I can't find any other resource for this.


回答1:


Continue to the Comments section of the function's manual and you'll see the following:

If you're writing code to encrypt/encrypt data in 2015, you should use openssl_encrypt() and openssl_decrypt(). The underlying library (libmcrypt) has been abandoned since 2007, and performs far worse than OpenSSL (which leverages AES-NI on modern processors and is cache-timing safe). [Link to the full comment]

So, Consider using openssl_encrypt() & openssl_decrypt() instead. They are still being supported and better performing.



来源:https://stackoverflow.com/questions/43642667/using-triple-des3des-with-php-7-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!