All the columns (fields) of the table are encoded when saved, how do query(comparison and search tasks).how is this possible? (when i use encodeString() method in laravel just can decode then do something on(in this way if data is big what do) and when use hash method, just can compare it is equal or not like password and can not decode and show).
And is there a better way to protect database information assuming that someone accesses the database?
how can I implement that in laravel or php?
There are two types of things one is encryption. In that case you give encryption key to encrypt data and same key to decrypt data. If you are using that, you can decrypt data after fetching from DB and compare it.
Other is Hashing. In it your data is hashed by a hashing function. In it data is hashed and its hash will be stored in DB. Passwords are stored in this way. and you cannot get data back from hash. you can create a data hash and compare it with hashes stored in DB.
In other words. Hashing is one way. You can create Hash from data but not data from Hash.
If you use encryption it will increase your system processing too much and if you use Hashing you need to have your data in hands to process it you cannot just retrieve it from DB.
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
Laravel is a free open source PHP framework that came out in 2011. Since then, it has been able to become the framework of choice for web developers. One of the main reasons for this is that Laravel makes it easier, faster, and safer to develop complex web applications than any other framework.
https://laravel.com/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.