You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
634 B
31 lines
634 B
<?php
|
|
namespace app\api\controller\v1;
|
|
|
|
use app\api\ApiController;
|
|
use app\common\lib\Aes;
|
|
|
|
class Auth extends ApiController
|
|
{
|
|
function test(){
|
|
$token='32UQBG%2BcpJ2AnvBDCR9gEix6a2ysc1Ro5pXg5%2Fvaang%3D';
|
|
$aes = new Aes([]);
|
|
print_r($aes->descrypt($token));
|
|
// parse_str($aes->descrypt($token),$params);
|
|
// print_r($params);
|
|
}
|
|
|
|
function testAes(){
|
|
$aes = new Aes([]);
|
|
echo ($aes->encrypt('sno=1234567890'));
|
|
}
|
|
|
|
function testDec(){
|
|
$params = input('params');
|
|
echo $params;
|
|
$aes = new Aes([]);
|
|
|
|
echo $aes->descrypt($params);
|
|
}
|
|
|
|
}
|