setBlockLength() public method

Since \phpseclib\Crypt\AES extends \phpseclib\Crypt\Rijndael, this function is, technically, available, but it doesn't do anything.
See also: phpseclib\Crypt\Rijndael::setBlockLength()
public setBlockLength ( integer $length )
$length integer
Beispiel #1
0
 private function cipher()
 {
     switch ($this->header['enc']) {
         case 'A128GCM':
         case 'A256GCM':
             throw new JOSE_Exception_UnexpectedAlgorithm('Algorithm not supported');
         case 'A128CBC-HS256':
         case 'A256CBC-HS512':
             $cipher = new AES(AES::MODE_CBC);
             break;
         default:
             throw new JOSE_Exception_UnexpectedAlgorithm('Unknown algorithm');
     }
     switch ($this->header['enc']) {
         case 'A128GCM':
         case 'A128CBC-HS256':
             $cipher->setBlockLength(128);
             break;
         case 'A256GCM':
         case 'A256CBC-HS512':
             $cipher->setBlockLength(256);
             break;
         default:
             throw new JOSE_Exception_UnexpectedAlgorithm('Unknown algorithm');
     }
     return $cipher;
 }