Summary

We have examined here both the theoretical underpinnings of encryption and practical ways to use PHP and encryption to solve three different typical problems that you are likely to face as you develop your web applications:

  1. Safeguarding passwords by hashing them
  2. Protecting sensitive data by encrypting it, either symmetrically or asymmetrically
  3. Verifying file or message contents by comparing before and after hashes, or by using digital signatures (which combine the two previous techniques in one convenient package)

With this survey behind us, we can turn to Chapter 16 to securing network connections.

Get Pro PHP Security: From Application Security Principles to the Implementation of XSS Defenses, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.