// continue;
// }
// if ($field == 'password') {
-// $value = md5($value);
+// $value = hash('md5', $value);
// }
// $fields[] = 'user_' . String::lower($field);
// $values[] = String::convertCharset($value, NLS::getCharset(), $conf['sql']['charset']);
// }
//
// require_once $GLOBALS['registry']->get('fileroot', 'folks') . '/lib/Folks.php';
-// $code = Folks::encodeString($userID, 'activate' . md5($extra['password']));
+// $code = Folks::encodeString($userID, 'activate' . hash('md5', $extra['password']));
// $link = Util::addParameter(Horde::applicationUrl('account/approve.php', true, -1),
// array('user' => $userID, 'code' => $code),
// null, false);
// $auth = &Auth::singleton('folks');
// return $auth->setAuth($_COOKIE['folks_login_user'], array('transparent' => 1, 'password' => null));
// }
-// }
\ No newline at end of file
+// }
return $vfs;
}
- $p = md5($user);
+ $p = hash('md5', $user);
$vfspath = Folks::VFS_PATH . '/' . substr(str_pad($p, 2, 0, STR_PAD_LEFT), -2) . '/';
$vfs_name = $p . '.' . $conf['images']['image_type'];
return $vfs;
}
- $p = md5($user);
+ $p = hash('md5', $user);
$vfspath = Folks::VFS_PATH . '/' . substr(str_pad($p, 2, 0, STR_PAD_LEFT), -2) . '/';
$vfs_name = $p . '.' . $GLOBALS['conf']['images']['image_type'];
$user = Auth::getAuth();
}
- $password = md5($password);
+ $password = hash('md5', $password);
return $this->_saveProfile(array('user_password' => $password), $user);
}
return false;
}
- return $encrypted == md5($plaintext);
+ return $encrypted == hash('md5', $plaintext);
}
/**
return $this->_deleteActivity($scope, $date, $user);
}
-}
\ No newline at end of file
+}
'id' => $user),
null, false);
} else {
- $p = md5($user);
+ $p = hash('md5', $user);
return $GLOBALS['conf']['images']['direct'] .
'/' . substr(str_pad($p, 2, 0, STR_PAD_LEFT), -2) . '/' . $view . '/' .
$p . '.' . $GLOBALS['conf']['images']['image_type'];
*/
static function encodeString($string, $key)
{
- $key = substr(md5($key), 0, 24);
+ $key = substr(hash('md5', $key), 0, 24);
$iv_size = mcrypt_get_iv_size(MCRYPT_3DES, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$string = mcrypt_ecb(MCRYPT_3DES, $key, $string, MCRYPT_ENCRYPT, $iv);
return $menu->render();
}
}
-}
\ No newline at end of file
+}
{
$GLOBALS['folks_shares'] = Horde_Share::singleton('folks');
- $share = $GLOBALS['folks_shares']->newShare(md5(microtime()));
+ $share = $GLOBALS['folks_shares']->newShare(hash('md5', microtime()));
if ($share instanceof PEAR_Error) {
return $share;
}
return $GLOBALS['folks_shares']->addShare($share);
}
-}
\ No newline at end of file
+}
{
$varname = $var->getVarName();
$varvalue = $vars->get($varname);
- $fieldId = 'obrowser_' . md5(uniqid(rand(), true));
+ $fieldId = 'obrowser_' . hash('md5', uniqid(rand(), true));
$html = '
<script type="text/javascript">
var obrowserWindowName;
$signature .= $k . $v;
}
- return md5($signature);
+ return hash('md5', $signature);
}
}
// See if we have a cache, and if so, try to get the data from it before
// polling the vimeo service.
if (!empty($this->_cache)) {
- $cache_key = 'VimeoJson' . md5(serialize($options));
+ $cache_key = 'VimeoJson' . hash('md5', serialize($options));
$data = $this->_cache->get($cache_key, $this->_cache_lifetime);
if ($data !== false) {
return unserialize($data);
{
$call = '/' . $this->_identifier . '/' . $this->_method . '.' . $this->_format;
if (!empty($this->_cache)) {
- $cache_key = 'VimeoRequest' . md5($call);
+ $cache_key = 'VimeoRequest' . hash('md5', $call);
$data = $this->_cache->get($cache_key, $this->_cache_lifetime);
if ($data !== false) {
// php format is already returned serialized
}
-}
\ No newline at end of file
+}
$vfs = VFS::singleton($GLOBALS['conf']['vfs']['type'], Horde::getDriverConfig('vfs', $GLOBALS['conf']['vfs']['type']));
// TODO: Garbage collection?
- $result = $vfs->writeData(self::VFS_DRAFTS_PATH, md5(Util::getFormData('user')), $body, true);
+ $result = $vfs->writeData(self::VFS_DRAFTS_PATH, hash('md5', Util::getFormData('user')), $body, true);
if (is_a($result, 'PEAR_Error')) {
return;
}
return;
}
- $filename = md5($_SESSION['imp']['uniquser']);
+ $filename = hash('md5', $_SESSION['imp']['uniquser']);
$vfs = VFS::singleton($GLOBALS['conf']['vfs']['type'], Horde::getDriverConfig('vfs', $GLOBALS['conf']['vfs']['type']));
if ($vfs->exists(self::VFS_DRAFTS_PATH, $filename)) {
$data = $vfs->read(self::VFS_DRAFTS_PATH, $filename);
static $instance = array();
$sig = is_a($in, 'Horde_Mime_Part')
- ? md5(serialize($in))
+ ? hash('md5', serialize($in))
: $in;
if (empty($instance[$sig])) {
'params' => array()
), $options);
- return Horde::link($this->urlView($mime_part, $actionID, $options), $options['jstext'], $options['class'], empty($options['dload']) ? null : 'view_' . md5($mime_part->getMIMEId() . $this->_mailbox . $this->_index)) . $text . '</a>';
+ return Horde::link($this->urlView($mime_part, $actionID, $options), $options['jstext'], $options['class'], empty($options['dload']) ? null : 'view_' . hash('md5', $mime_part->getMIMEId() . $this->_mailbox . $this->_index)) . $text . '</a>';
}
/**
}
/* Compute values that will uniquely identify this list. */
- $sig = md5(serialize(array(intval($sub), $filter)));
+ $sig = hash('md5', serialize(array(intval($sub), $filter)));
/* Either get the list from the cache, or go to the IMAP server to
obtain it. */
}
require_once IMP_BASE . '/lib/version.php';
- $sig = md5(serialize($s_list) . max($mtime) . IMP_VERSION);
+ $sig = hash('md5', serialize($s_list) . max($mtime) . IMP_VERSION);
switch ($cache_type) {
case 'filesystem':
}
require_once IMP_BASE . '/lib/version.php';
- $sig = md5(serialize($css) . max($mtime) . IMP_VERSION);
+ $sig = hash('md5', serialize($css) . max($mtime) . IMP_VERSION);
switch ($cache_type) {
case 'filesystem':
}
// Make sure URL is unique.
- $location = Util::addParameter($location, 'unique', md5(microtime()));
+ $location = Util::addParameter($location, 'unique', hash('md5', microtime()));
header('Location: ' . $location);
exit;
}
// Make sure URL is unique.
-$location = Util::addParameter($location, 'unique', md5(microtime()), false);
+$location = Util::addParameter($location, 'unique', hash('md5', microtime()), false);
header('Location: ' . $location);
if (empty($url)) {
$url = Horde::applicationUrl($prefs->getValue('defaultview') . '.php', true);
}
- header('Location: ' . Util::addParameter($url, 'unique', md5(microtime()), false));
+ header('Location: ' . Util::addParameter($url, 'unique', hash('md5', microtime()), false));
exit;
}
break;
}
$html .= '</td><td class="text"> </td>' .
- '<td class="block-eventbox category' . md5($event->getCategory()) . '" valign="top">';
+ '<td class="block-eventbox category' . hash('md5', $event->getCategory()) . '" valign="top">';
if ($event->start->compareDate($now) < 0 &&
$event->end->compareDate($now) > 0) {
}
$html .= '</td><td class="text"> </td>' .
- '<td class="block-eventbox category' . md5($event->getCategory()) . '" valign="top">';
+ '<td class="block-eventbox category' . hash('md5', $event->getCategory()) . '" valign="top">';
if ($event->start->compareDate($startDate) < 0 &&
$event->end->compareDate($startDate) > 0) {
}
$html .= '</td><td class="text"> </td>' .
- '<td class="block-eventbox category' . md5($event->getCategory()) . '" valign="top">';
+ '<td class="block-eventbox category' . hash('md5', $event->getCategory()) . '" valign="top">';
if ($event_active) {
$html .= '<strong>';
if ($event->getUID()) {
$uid = $event->getUID();
} else {
- $uid = md5(uniqid(mt_rand(), true));
+ $uid = hash('md5', uniqid(mt_rand(), true));
$event->setUID($uid);
$event->setId($uid);
}
if ($event->getId()) {
$id = $event->getId();
} else {
- $id = md5(uniqid(mt_rand(), true));
+ $id = hash('md5', uniqid(mt_rand(), true));
$event->setId($id);
}
function execute()
{
// Create new share.
- $calendar = $GLOBALS['kronolith_shares']->newShare(md5(microtime()));
+ $calendar = $GLOBALS['kronolith_shares']->newShare(hash('md5', microtime()));
if (is_a($calendar, 'PEAR_Error')) {
return $calendar;
}
}
require_once KRONOLITH_BASE . '/lib/version.php';
- $sig = md5(serialize($s_list) . max($mtime) . KRONOLITH_VERSION);
+ $sig = hash('md5', serialize($s_list) . max($mtime) . KRONOLITH_VERSION);
switch ($cache_type) {
case 'filesystem':
}
require_once KRONOLITH_BASE . '/lib/version.php';
- $sig = md5(serialize($css) . max($mtime) . KRONOLITH_VERSION);
+ $sig = hash('md5', serialize($css) . max($mtime) . KRONOLITH_VERSION);
switch ($cache_type) {
case 'filesystem':
$eventCategories[$event->getCategory()] = true;
}
- $row .= '<td class="day-eventbox category' . md5($event->getCategory()) . '" '
+ $row .= '<td class="day-eventbox category' . hash('md5', $event->getCategory()) . '" '
. 'width="' . round(90 / count($this->_currentCalendars)) . '%" '
. 'valign="top" colspan="' . $this->_span[$cid] . '">'
. $event->getLink($this, true, $this->link(0, true));
}
}
- $row .= '<td class="day-eventbox category' . md5($event->getCategory()) . '" '
+ $row .= '<td class="day-eventbox category' . hash('md5', $event->getCategory()) . '" '
. 'width="' . round((90 / count($this->_currentCalendars)) * ($span / $this->_span[$cid])) . '%" '
. 'valign="top" colspan="' . $span . '" rowspan="' . $event->rowspan . '">'
. $event->getLink($this, true, $this->link(0, true));
if ($event->hasPermission(PERMS_READ)) {
$eventCategories[$event->getCategory()] = true;
}
- $html .= '<div class="month-eventbox category' . md5($event->getCategory()) . '">'
+ $html .= '<div class="month-eventbox category' . hash('md5', $event->getCategory()) . '">'
. $event->getLink($date, true, $this->link(0, true));
if ($showTime) {
$html .= '<div class="event-time">' . htmlspecialchars($event->getTimeRange()) . '</div>';
$eventCategories[$event->getCategory()] = true;
}
- $row .= '<td class="week-eventbox category' . md5($event->getCategory()) . '" '
+ $row .= '<td class="week-eventbox category' . hash('md5', $event->getCategory()) . '" '
. 'width="' . round(99 / count($this->days[$j]->_currentCalendars)) . '%" '
. 'valign="top">'
. $event->getLink($this->days[$j], true, $this->link(0, true));
}
}
- $row .= '<td class="week-eventbox category' . md5($event->getCategory()) . '" '
+ $row .= '<td class="week-eventbox category' . hash('md5', $event->getCategory()) . '" '
. 'valign="top" '
. 'width="' . floor(((90 / count($this->days)) / count($this->_currentCalendars)) * ($span / $this->days[$j]->_span[$cid])) . '%" '
. 'colspan="' . $span . '" rowspan="' . $event->rowspan . '">'
continue;
}
- $html .= ' <span class="legend-eventbox event category' . md5($category) . '">' .
+ $html .= ' <span class="legend-eventbox event category' . hash('md5', $category) . '">' .
Text::htmlAllSpaces($category) . '</span>';
}
//-->
</script>
-<form method="post" name="contacts" onsubmit="passAddresses();" action="contacts.php?nocache=<?php echo md5(mt_rand()) ?>">
+<form method="post" name="contacts" onsubmit="passAddresses();" action="contacts.php?nocache=<?php echo hash('md5', mt_rand()) ?>">
<input type="hidden" name="sa" />
<?php Util::pformInput() ?>
<tr class="text">
- <td nowrap="nowrap" class="category<?php echo md5($found->getCategory()) ?>">
+ <td nowrap="nowrap" class="category<?php echo hash('md5', $found->getCategory()) ?>">
<?php echo $found->getLink() ?>
</td>
<td class="nowrap"><?php echo htmlspecialchars($found->getCategory()) ?></td>
'.month-eventBox a, .week-eventBox a, .day-eventBox a, .block-eventBox a, .legend-eventBox a, ',
'.month-eventBox a:hover, .week-eventBox a:hover, .day-eventBox a:hover, .block-eventBox a:hover, .legend-eventBox a:hover { ';
} else {
- $class = '.category' . md5($category);
+ $class = '.category' . hash('md5', $category);
echo "$class, .linedRow td$class, $class a, $class a:hover { ";
}