本文整理汇总了PHP中Encryption::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Encryption::getInstance方法的具体用法?PHP Encryption::getInstance怎么用?PHP Encryption::getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Encryption
的用法示例。
在下文中一共展示了Encryption::getInstance方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: let
function let()
{
$GLOBALS['TL_CONFIG']['encryptionKey'] = 'gg889';
$GLOBALS['TL_CONFIG']['encryptionMode'] = 'cfb';
$GLOBALS['TL_CONFIG']['encryptionCipher'] = 'rijndael-256';
$this->beConstructedWith(\Encryption::getInstance());
}
示例2: __construct
/**
* Constructor
*/
public function __construct()
{
$this->BackendUser = BackendUser::getInstance();
parent::__construct();
$this->Encryption = Encryption::getInstance();
$this->Config = Config::getInstance();
$this->objSyncCtoFiles = SyncCtoFiles::getInstance();
$this->objSyncCtoDatabase = SyncCtoDatabase::getInstance();
$this->objSyncCtoHelper = SyncCtoHelper::getInstance();
$this->loadLanguageFile("default");
$this->arrDebug = array();
}
示例3: empty
// Display transactions for this order
$transaction['status'] = empty($transaction['status']) ? $GLOBALS['lang']['common']['null'] : $transaction['status'];
$transaction['time'] = formatTime($transaction['time']);
$transaction['amount'] = Tax::getInstance()->priceFormat($transaction['amount']);
$smarty_data['list_transactions'][] = $transaction;
if (isset($transaction['actions'])) {
$GLOBALS['smarty']->assign('DISPLAY_ACTIONS', true);
}
}
$GLOBALS['smarty']->assign('TRANSACTIONS', $smarty_data['list_transactions']);
$GLOBALS['smarty']->assign('DISPLAY_TRANSACTIONS', true);
}
// Load credit card details, if any
if (!empty($summary[0]['offline_capture'])) {
$GLOBALS['main']->addTabControl($lang['orders']['title_card_details'], 'credit_card');
$decrypt = Encryption::getInstance();
$decrypt->setup(false, $summary[0]['cart_order_id']);
$card = unserialize($decrypt->decrypt(stripslashes($summary[0]['offline_capture'])));
if (empty($card)) {
// Decrypt CC3/CC4 Card Details
$card = unserialize($decrypt->decryptDepreciated(base64_decode($summary[0]['offline_capture']), $summary[0]['cart_order_id']));
}
$card = !empty($card) ? $card : array('card_type' => '', 'card_number' => '', 'card_expire' => '', 'card_valid' => '', 'card_issue' => '', 'card_cvv' => '');
foreach ($card as $key => $value) {
$smarty_data['card_data'][$key] = array('name' => $lang['orders']['card_' . $key], 'value' => CC_SSL ? $value : 'View under SSL');
}
$GLOBALS['smarty']->assign('CARD_DATA', $smarty_data['card_data']);
$GLOBALS['smarty']->assign('CARD_DELETE', '?_g=orders&action=edit&order_id=' . $summary[0]['cart_order_id'] . "&delete_card=1#credit_card");
$GLOBALS['smarty']->assign('DISPLAY_CARD', true);
}
// Load addresses
示例4: function
// ---------------------------------------------------------------------------------------------------------------------
/**
* Contao Files as file system service.
*
* @return \Files
*/
$container[Services::FILE_SYSTEM] = function () {
return \Files::getInstance();
};
/**
* Contao Encryption class as a service.
*
* @return Encryption
*/
$container[Services::ENCRYPTION] = function () {
return Encryption::getInstance();
};
/**
* Request token as service.
*
* @return RequestToken
*/
$container[Services::REQUEST_TOKEN] = $container->share(function () {
return RequestToken::getInstance();
});
// ---------------------------------------------------------------------------------------------------------------------
// Toolkit Dependency injection
//
// Toolkit provides an container implementation which based on container-interop/container-interop ContainerInterface.
// Instead of access Pimple in user land code it's recommend to depend on ContainerInterface. Since Contao 4.x is
// supported, an adapter to Symfony container based on ContainerInterface or the updated