ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
AES.php
Go to the documentation of this file.
1<?php
2
51
53
61class AES extends Rijndael
62{
72 function setBlockLength($length)
73 {
74 return;
75 }
76
87 function setKeyLength($length)
88 {
89 switch ($length) {
90 case 160:
91 $length = 192;
92 break;
93 case 224:
94 $length = 256;
95 }
96 parent::setKeyLength($length);
97 }
98
109 function setKey($key)
110 {
111 parent::setKey($key);
112
113 if (!$this->explicit_key_length) {
114 $length = strlen($key);
115 switch (true) {
116 case $length <= 16:
117 $this->key_length = 16;
118 break;
119 case $length <= 24:
120 $this->key_length = 24;
121 break;
122 default:
123 $this->key_length = 32;
124 }
125 $this->_setEngine();
126 }
127 }
128}
An exception for terminatinating execution or to throw for unit testing.
setBlockLength($length)
Dummy function.
Definition: AES.php:72
setKey($key)
Sets the key.
Definition: AES.php:109
setKeyLength($length)
Sets the key length.
Definition: AES.php:87
_setEngine()
Sets the engine as appropriate.
Definition: Base.php:1649
Pure-PHP implementation of AES.
Pure-PHP implementation of Rijndael.
Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic...
Definition: AES.php:50