Answer the question
In order to leave comments, you need to log in
How to encrypt data in php?
The user specifies a phrase and a private key. You need to encrypt the data and decrypt it using the entered key.
I looked in the direction of RSA, but either I'm stupid, or I can't figure out how to approach. I looked at the library at phpseclib.sourceforge.net/rsa/examples.html , but nothing good came of it.
Please tell me how to solve this problem.
Answer the question
In order to leave comments, you need to log in
https://www.google.com
www.php.net/manual/en/book.openssl.php
phpseclib.sourceforge.net/rsa/intro.html
Well, for example:
Connect extension=php_openssl.dll
to PHP Encrypt openssl_encrypt ('text' , 'AES-256-CBC' , 'user_password') and use
openssl-decrypt to decrypt it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question