Exemplo n.º 1
0
 /**
  * Extended Crypt_Rijndael::_setup() 
  *
  * Optimizing the key schedule arrays ($w, $dw) for _encryptBlock() and _decryptBlock() after Crypt_Rijndael::_setup()
  *
  * @see Crypt_Rijndael::_setup()
  * @access private
  */
 function _setup()
 {
     if (!$this->changed) {
         return;
     }
     $this->w = $this->dw = array();
     parent::_setup();
     $this->dw = array_reverse($this->dw);
     $w = array_pop($this->w);
     $dw = array_pop($this->dw);
     foreach ($this->w as $r => $wr) {
         foreach ($wr as $c => $wc) {
             $w[] = $wc;
             $dw[] = $this->dw[$r][$c];
         }
     }
     $this->w = $w;
     $this->dw = $dw;
 }