Introduction¶
There are several extensions & libraries that provide cryptography primitives for PHP:
- the legacy mcrypt extension
- the OpenSSL extension
- the libsodium extension
- the tomcrypt extension
- probably others I don’t know about…
Although these extensions all provide roughtly the same features, the programmatic interface they expose is very different.
Also, very few of those extensions support on-the-fly encryption/decryption.
Cryptal was created to work around these issues by providing a unified interface & transparent support for on-the-fly encryption/decryption using stream filters.