Sapient uses libsodium to encrypt or sign HTTP message bodies. It works either client-side or server-side, on requests or responses.
Features:
If libsodium is not available (it currently has to be installed via PECL), sodium_compat will polyfill these features.
It works on PSR-7 interfaces, but for framework-specific adoption, we’ve created a few Sapient adapters and creating your own is relatively straightforward.