phpAES crypto library:
require 'AES.class.php'; // AES PHP implementation $key = "Secret Passphrase"; // 128-bit key $aes = new AES($key); /*** encrypt */ $ciphertext = $aes->encrypt("plaintext"); /*** decrypt */ $plaintext = $aes->decrypt($ciphertext);
The modes of operation currently available are:
And the padding schemes currently available are:
Supported cipher modes include: Electronic Codebook (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), and Output Feedback (OFB). There are two versions of phpAES, the free version of phpAES only supports ECB mode while the paid version supports all modes.