本文整理匯總了PHP中Crypt::setData方法的典型用法代碼示例。如果您正苦於以下問題:PHP Crypt::setData方法的具體用法?PHP Crypt::setData怎麽用?PHP Crypt::setData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Crypt
的用法示例。
在下文中一共展示了Crypt::setData方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Crypt
<?php
require_once '../Crypt.php';
$crypt = new Crypt();
$crypt->setKey('YOUR CYPHER KEY');
$crypt->setComplexTypes(TRUE);
$crypt->setData('cryptPHP#bWOXEusBnyDHRuNY+zAyqOWpYLPkmSMJ#tdcvQqIxylC3bNuxFQ1GUIyKN0eO8HF/2JsQJG2GhkovgNEmQDTYLELIwNwoK5vmgaErww4CGslPDx1F2ZS7uVqMJcNnD4tp7XAKzCCqmWZNw+1mWRuf#3089b5eda40c7a40171666c6fb2694077b03de2d');
var_dump($crypt->decrypt());
示例2: Crypt
<?php
require_once '../Crypt.php';
$crypt = new Crypt();
$crypt->setKey('YOUR CYPHER KEY');
$crypt->setData('cryptPHP#YvpAQTL4Xdj7LKZTRfvxkBdYbQ2s+1Kv#xKLBMfkIjDdSGsBPc1OK0RvLUxX5HdAaaW14UrItULIKMpKCm84a4An6szpFrDkj3gfK#66a6b892f47ca5481af41620520b182d3a7fbf87');
echo $crypt->decrypt();
示例3: Crypt
<?php
require_once '../Crypt.php';
$crypt = new Crypt();
$crypt->setKey('YOUR CYPHER KEY');
$crypt->setComplexTypes(TRUE);
$data = new ArrayObject();
$data->append('foo');
$data->append('bar');
$data->append('baz');
$crypt->setData($data);
echo $crypt->encrypt();
示例4: Crypt
<?php
require_once '../Crypt.php';
$crypt = new Crypt();
$crypt->setKey('YOUR CYPHER KEY');
$crypt->setData('the answer to life the universe and everything = 42');
echo $crypt->encrypt();