PHP技术教程:TEA算法实现(2)
来源:互联网 责任编辑:栏目编辑 发表时间:2013-07-01 22:33 点击:次
PHP部分代码非我原创,大家可以了解一下这方面的知识
<?php
$date = '8345354023476-3434';
$key = '12345';
$t = new tea ( );
$tea = $t->encrypt ( $date, $key );
$eetea = $t->decrypt ( $tea, $key );
var_dump ( $tea );
var_dump ( $eetea );
class tea {
private $a, $b, $c, $d;
private $n_iter;
public function __construct() {
$this->setIter ( 32 );
}
private function setIter($n_iter) {
$this->n_iter = $n_iter;
相关新闻>>
- 发表评论
-
- 最新评论 更多>>