Lines Matching refs:length
124 * Sets the key length
128 * @param int $length
129 * @throws \LengthException if the key length is invalid
131 public function setKeyLength($length)
133 if ($length < 8 || $length > 2048) {
134 throw new \LengthException('Key size of ' . $length . ' bits is not supported by this algorithm. Only keys between 1 and 256 bytes are supported');
137 $this->key_length = $length >> 3;
139 parent::setKeyLength($length);
143 * Sets the key length
151 $length = strlen($key);
152 if ($length < 1 || $length > 256) {
153 throw new \LengthException('Key size of ' . $length . ' bytes is not supported by RC4. Keys must be between 1 and 256 bytes long');