3 * An implementation of the AES cipher, using the phpseclib implementation
5 * This was forked from phpseclib and modified to use CryptLib conventions
9 * @category PHPCryptLib
12 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
13 * @author Jim Wigginton <terrafrost@php.net>
14 * @copyright 2011 The Authors
15 * @license http://www.opensource.org/licenses/mit-license.html MIT License
16 * @version Build @@version@@
19 namespace CryptLib\Cipher\Block\Cipher
;
22 * An implementation of the AES cipher, using the phpseclib implementation
24 * @category PHPCryptLib
27 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
29 class AES
extends Rijndael
{
32 * Get a list of supported ciphers for this class implementation
34 * @return array A list of supported ciphers
36 public static function getSupportedCiphers() {
45 * Construct the instance for the supplied cipher name
47 * @param string $cipher The cipher to implement
50 * @throws InvalidArgumentException if the cipher is not supported
52 public function __construct($cipher) {
53 parent
::__construct($cipher);
54 list (, $bits) = explode('-', $cipher, 2);
55 $this->setBlockSize(128);
56 $this->setKeySize($bits);