Beispiel #1
0
 /**
  * Returns the correct AES-128 CBC encryption adapter
  *
  * @return  AKEncryptionAESAdapterInterface
  *
  * @since   5.2.0
  * @author  Nicholas K. Dionysopoulos
  */
 public static function getAdapter()
 {
     static $adapter = null;
     if (is_object($adapter) && $adapter instanceof AKEncryptionAESAdapterInterface) {
         return $adapter;
     }
     $adapter = new OpenSSL();
     if (!$adapter->isSupported()) {
         $adapter = new Mcrypt();
     }
     return $adapter;
 }