本文主要是关于php的des加解密方法代码内容,有需要的朋友可以参考一下。
test.php测试文件
'AbcdefghijklmnopqrstuvwX','secretcode'=>'Abcdefgh']; $encode = $des->encode($data, $conf); print_r($encode); echo "
"; $decode = $des->decode($encode,$conf); print_r($decode); ?>
Des.php
6款图片鼠标悬停效果JS代码,鼠标悬停在图片上后,文字标题以6种不同的动画形式出现,兼容主流浏览器,php中文网推荐下载! 使用方法: 1、head区域引用css文件,modernizr.custom.js 2、在文件中加入!-- 代码 开始 --!-- 代码 结束 --区域代码 3、复制images文件夹里的图片到相应的路径
encode($data, $configKey["appkey"], $configKey["secretcode"]);
}
public static function decode($data, $configKey) {
$tripleDes = new TripleDES();
return $tripleDes->decode($data, $configKey["appkey"], $configKey["secretcode"]);
}
public static function encodeArr($data, $configKey) {
$data = json_encode($data);
return self::encode($data, $configKey);
}
public static function decodeArr($data, $configKey) {
$res = self::decode($data, $configKey);
return json_decode($res,true);
}
}相关教程:PHP视频教程










