On the Paragon Initiative site there's a new post that promises a way to solve all of your cryptography problems in PHP with three simple steps.
Last year, we began developing Halite, a FOSS high-level wrapper for the PHP bindings to libsodium. We use Halite extensively in our own projects (including our upcoming CMS which has quite a few of its own innovative cryptography features baked-in).
As of version 2.1.0, we are confident that Halite solves all of the application-layer cryptography problems that most PHP developers face; and it does so in three easy steps. (For transport-layer cryptography, you should still use TLS, of course.)
Their three steps to effectively using Halite and libsodium in your application are:
- Step One: Managing Cryptography Keys
- Step Two: Encrypting or Authenticating with Halite
- Step Three: Decrypt or Verify
Each step comes with example code showing how to use the tool to accomplish it. There's also a few other problems that are solved by using the library including generating encrypted password hashes and whole file cryptography.