includes/rijndael.php
changeset 348 87e08a6e4fec
parent 345 4ccdfeee9a11
child 378 c1c7fa6b329f
equal deleted inserted replaced
347:299a90e28abc 348:87e08a6e4fec
   124     $this->Nb = $this->blockSizeInBits / 32;
   124     $this->Nb = $this->blockSizeInBits / 32;
   125     $this->Nr = $this->roundsArray[$this->Nk][$this->Nb];
   125     $this->Nr = $this->roundsArray[$this->Nk][$this->Nb];
   126     $this->debug = $debug;
   126     $this->debug = $debug;
   127   }
   127   }
   128   
   128   
   129   function singleton($key_size, $block_size)
   129   public static function singleton($key_size, $block_size)
   130   {
   130   {
   131     global $_aes_objcache;
   131     global $_aes_objcache;
   132     if ( isset($_aes_objcache["$key_size,$block_size"]) )
   132     if ( isset($_aes_objcache["$key_size,$block_size"]) )
   133     {
   133     {
   134       return $_aes_objcache["$key_size,$block_size"];
   134       return $_aes_objcache["$key_size,$block_size"];