php代码
<?php //迭代算法 function md5_1_1($data, $times = 32) { //循环使用MD5 for ($i = 0; $i < $times; $i++) { $data = md5($data); } return $data; } //递归算法 function md5_1_2($data, $times = 32) { if ($times > 0) { $data = md5($data); $times--; return md5_1_2($data, $times); //实现递归 } else { return $data; } } ?>