What is the use of encryption and decryption of data in php ?How we can encrypte or decrypt data using php ?give some examples. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is the use of encryption and decryption of data in php ?How we can encrypte or decrypt data using php ?give some examples.

4th Apr 2018, 4:19 PM
Christian CK
Christian CK - avatar
2 Answers
+ 2
Lets say that you're registering an account. You would be sending personal information to the server, such as your password. Some data you don't have to encrypt, but your password or other such critical information should be encrypted. Why? It's more secure and prevents that data from being intercepted (which is a lot easier than it sounds). As well, it'll store that data in an encrypted state. Imagine that I created a website and I did NOT encrypt your passwords. I could pull up my database and see all of your passwords in plain text. Now I have your name, your email addy, and your plain text password. Guess how many people use the exact same password for most things? Most people. Now I have access to all of your other accounts, and if I don't, I probably have access to your email account now and can get access with the other accounts that way. So it's good to encrypt certain data when interacting between the client-server.
4th Apr 2018, 4:31 PM
Fata1 Err0r
Fata1 Err0r - avatar