thomascube
2008-05-07 1854c4525bf1fce227a8cc0fa8aad06615df0eae
program/include/rcube_config.php
@@ -148,5 +148,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;
  }
}