Bullet-proof Encryption

Matthew R recently took a team-lead position and was tasked with improving the quality of the company's application. He started with security, specifically the fact that user passwords were stored in plain-text. "But it's easier this way," the developer complained when Matthew suggested to change it, "plus, it's relatively easy to break modern encryption."

Matthew insisted on the change, and pointed the developer to a few resources on passwords that discussed hashing, salting, and password retrieval, and the developer begrudgingly made the change. When Matthew went to review the code, this is what he found.