Пример #1
0
 /**
  *	Configure
  *	@param \Touchbase\Core\Config\Store $config
  *	@throws \RuntimeException - If the encyption library doesn't exist
  *	@return VOID
  */
 public function configure(ConfigStore $config)
 {
     $encryptionLibrary = $config->get("encryption")->get("library", "phpseclib\\Crypt\\AES");
     if (class_exists($encryptionLibrary)) {
         $this->_encryption = new $encryptionLibrary();
         $this->_encryption->setKey($config->get("encryption")->get("key", "#o%jR=S0Y6+ic7R\$~6Y;0a7b65u\$_%"));
     } else {
         throw new \RuntimeException(sprintf("Encryption library does not exist: %s", $encryptionLibrary));
     }
 }