0

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.

Community
  • 1
  • 1
Cruncher
  • 7,641
  • 1
  • 31
  • 65

1 Answers1

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.

Ofir Baruch
  • 10,323
  • 2
  • 26
  • 39