Rev 874 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 874 | Rev 1042 | ||
---|---|---|---|
Line 37... | Line 37... | ||
37 | * |
37 | * |
38 | * echo $aes->decrypt($aes->encrypt($plaintext)); |
38 | * echo $aes->decrypt($aes->encrypt($plaintext)); |
39 | * ?> |
39 | * ?> |
40 | * </code> |
40 | * </code> |
41 | * |
41 | * |
42 | * @category Crypt |
- | |
43 | * @package AES |
- | |
44 | * @author Jim Wigginton <terrafrost@php.net> |
42 | * @author Jim Wigginton <terrafrost@php.net> |
45 | * @copyright 2008 Jim Wigginton |
43 | * @copyright 2008 Jim Wigginton |
46 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
44 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
47 | * @link http://phpseclib.sourceforge.net |
45 | * @link http://phpseclib.sourceforge.net |
48 | */ |
46 | */ |
Line 50... | Line 48... | ||
50 | namespace phpseclib3\Crypt; |
48 | namespace phpseclib3\Crypt; |
51 | 49 | ||
52 | /** |
50 | /** |
53 | * Pure-PHP implementation of AES. |
51 | * Pure-PHP implementation of AES. |
54 | * |
52 | * |
55 | * @package AES |
- | |
56 | * @author Jim Wigginton <terrafrost@php.net> |
53 | * @author Jim Wigginton <terrafrost@php.net> |
57 | * @access public |
- | |
58 | */ |
54 | */ |
59 | class AES extends Rijndael |
55 | class AES extends Rijndael |
60 | { |
56 | { |
61 | /** |
57 | /** |
62 | * Dummy function |
58 | * Dummy function |
63 | * |
59 | * |
64 | * Since \phpseclib3\Crypt\AES extends \phpseclib3\Crypt\Rijndael, this function is, technically, available, but it doesn't do anything. |
60 | * Since \phpseclib3\Crypt\AES extends \phpseclib3\Crypt\Rijndael, this function is, technically, available, but it doesn't do anything. |
65 | * |
61 | * |
66 | * @see \phpseclib3\Crypt\Rijndael::setBlockLength() |
62 | * @see \phpseclib3\Crypt\Rijndael::setBlockLength() |
67 | * @access public |
- | |
68 | * @param int $length |
63 | * @param int $length |
69 | * @throws \BadMethodCallException anytime it's called |
64 | * @throws \BadMethodCallException anytime it's called |
70 | */ |
65 | */ |
71 | public function setBlockLength($length) |
66 | public function setBlockLength($length) |
72 | { |
67 | { |
Line 77... | Line 72... | ||
77 | * Sets the key length |
72 | * Sets the key length |
78 | * |
73 | * |
79 | * Valid key lengths are 128, 192, and 256. Set the link to bool(false) to disable a fixed key length |
74 | * Valid key lengths are 128, 192, and 256. Set the link to bool(false) to disable a fixed key length |
80 | * |
75 | * |
81 | * @see \phpseclib3\Crypt\Rijndael:setKeyLength() |
76 | * @see \phpseclib3\Crypt\Rijndael:setKeyLength() |
82 | * @access public |
- | |
83 | * @param int $length |
77 | * @param int $length |
84 | * @throws \LengthException if the key length isn't supported |
78 | * @throws \LengthException if the key length isn't supported |
85 | */ |
79 | */ |
86 | public function setKeyLength($length) |
80 | public function setKeyLength($length) |
87 | { |
81 | { |
Line 101... | Line 95... | ||
101 | * |
95 | * |
102 | * Rijndael supports five different key lengths, AES only supports three. |
96 | * Rijndael supports five different key lengths, AES only supports three. |
103 | * |
97 | * |
104 | * @see \phpseclib3\Crypt\Rijndael:setKey() |
98 | * @see \phpseclib3\Crypt\Rijndael:setKey() |
105 | * @see setKeyLength() |
99 | * @see setKeyLength() |
106 | * @access public |
- | |
107 | * @param string $key |
100 | * @param string $key |
108 | * @throws \LengthException if the key length isn't supported |
101 | * @throws \LengthException if the key length isn't supported |
109 | */ |
102 | */ |
110 | public function setKey($key) |
103 | public function setKey($key) |
111 | { |
104 | { |