Subversion Repositories oidplus

Rev

Rev 846 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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