本文整理汇总了PHP中MD5Crypt::Decrypt方法的典型用法代码示例。如果您正苦于以下问题:PHP MD5Crypt::Decrypt方法的具体用法?PHP MD5Crypt::Decrypt怎么用?PHP MD5Crypt::Decrypt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MD5Crypt
的用法示例。
在下文中一共展示了MD5Crypt::Decrypt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: time
function adodb_sess_read($key)
{
$Crypt = new MD5Crypt();
global $ADODB_SESS_CONN, $ADODB_SESS_INSERT, $ADODB_SESSION_TBL;
$rs = $ADODB_SESS_CONN->Execute("SELECT data FROM {$ADODB_SESSION_TBL} WHERE sesskey = '{$key}' AND expiry >= " . time());
if ($rs) {
if ($rs->EOF) {
$ADODB_SESS_INSERT = true;
$v = '';
} else {
// Decrypt session data
$v = rawurldecode($Crypt->Decrypt(reset($rs->fields), ADODB_Session_Key()));
}
$rs->Close();
return $v;
} else {
$ADODB_SESS_INSERT = true;
}
return '';
}
示例2: array
</table></td>
<?php
$heading = array();
$contents = array();
if (isset($info)) {
$heading[] = array('text' => '<b>' . TABLE_HEADING_SHOPPING_CART . '</b><br />');
if (STORE_SESSIONS == '1') {
$sessionstable = $oostable['sessions'];
$session_data = $dbconn->Execute("SELECT data FROM $sessionstable WHERE sesskey = '" . $info . "'");
if (STORE_SESSIONS_CRYPT == '1') {
include_once '../includes/lib/adodb/session/crypt.inc.php';
$Crypt = new MD5Crypt;
$session_data = rawurldecode($Crypt->Decrypt(reset($session_data->fields), crypt(ADODB_Session::encryptionKey(), $info)));
} else {
$session_data = rawurldecode($session_data->fields['data']);
}
} else {
if ( (file_exists(oos_session_save_path() . '/sess_' . $info)) && (filesize(oos_session_save_path() . '/sess_' . $info) > 0) ) {
$session_data = file(oos_session_save_path() . '/sess_' . $info);
$session_data = trim(implode('', $session_data));
}
}
$currency = unserialize(oos_get_serialized_variable($session_data, 'currency', 'string'));
$cart = unserialize(oos_get_serialized_variable($session_data, 'cart', 'object'));
if (isset($cart) && is_object($cart)) {