On Library Exceptions

https://twitter.com/chrisguitarguy/status/915313560036741120 I made this statement on twitter about PHP libraries throwing exceptions that I want to expand here. I'd say there are two broad categories of exceptions that a library might throw. Domain Exceptions These are specific to the library's domain. For instance, if I'm working with AdWords I know that AdWords account IDs take… Continue reading On Library Exceptions

AWS Key Management Service Envelope Encryption in PHP

This is a PHP example of what AWS calls envelope encryption. Really this is just a way to use a key hierarchy rooted at a key management service (KMS) key. We'll use PHP 7.2's libsodium support (via paragonie/sodium_compat). The idea is that you have a customer master key that lives in KMS - this never… Continue reading AWS Key Management Service Envelope Encryption in PHP