码迷,mamicode.com
首页 > Web开发 > 详细

php 万能加密

时间:2016-02-04 18:44:25      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:

function fue($hash,$times) {
	// Execute the encryption(s) as many times as the user wants
	for($i=$times;$i>0;$i--) {
		// Encode with base64...
		$hash=base64_encode($hash);
		// and md5...
		$hash=md5($hash);
		// sha1...
		$hash=sha1($hash);
		// sha256... (one more)
		$hash=hash("sha256", $hash);
		// sha512
		$hash=hash("sha512", $hash);

	}
	// Finaly, when done, return the value
	return $hash;
}

php 万能加密

标签:

原文地址:http://www.cnblogs.com/cbugs/p/php.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!