thomascube
2008-05-09 2ca388d0d756b57398d129f51ae6fa087e4b045e
program/include/rcube_config.php
@@ -54,6 +54,9 @@
    // load database config
    include_once(INSTALL_PATH . 'config/db.inc.php');
    $this->prop += (array)$rcmail_config;
    // load host-specific configuration
    $this->load_host_config();
    // fix paths
    $this->prop['skin_path'] = $this->prop['skin_path'] ? unslashify($this->prop['skin_path']) : 'skins/default';
@@ -148,5 +151,26 @@
    return $this->prop;
  }
  
  /**
   * Return a 24 byte key for the DES encryption
   *
   * @return string DES encryption key
   */
  public function get_des_key()
  {
    $key = !empty($this->prop['des_key']) ? $this->prop['des_key'] : 'rcmail?24BitPwDkeyF**ECB';
    $len = strlen($key);
    // make sure the key is exactly 24 chars long
    if ($len<24)
      $key .= str_repeat('_', 24-$len);
    else if ($len>24)
      substr($key, 0, 24);
    return $key;
  }
}