Пример #1
0
 /**
  * Sets the key length.
  *
  * Valid key lengths are 64, 128 and 192
  *
  * @see \phpseclib\Crypt\Base:setKeyLength()
  * @access public
  * @param int $length
  */
 function setKeyLength($length)
 {
     $length >>= 3;
     switch (true) {
         case $length <= 8:
             $this->key_length = 8;
             break;
         case $length <= 16:
             $this->key_length = 16;
             break;
         default:
             $this->key_length = 24;
     }
     parent::setKeyLength($length);
 }