本文整理匯總了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)) {