How it works...
When it comes to protecting sensitive data, we need to minimize the risk of that data being leaked or traded; that's why, correctly encrypting the stored information and protecting the encryption keys is the first thing to do. If there is no possibility of not storing such data, it is the ideal option.
Passwords should be hashed with a one-way hashing algorithm before storing them in the database. This way, if they are stolen, the attacker won't be able to use them immediately, and if the passwords are strong and hashed with strong algorithms, they won't be able to break them in a realistic time.
If we store sensitive documents or sensitive data in the document root of our server (/var/www/html/ in Apache, for example), we ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access