<?php
$Tools_config = array(
'ver' => 'v1.0 Bulid 1217',//版本
'name'=> 'MD5加密', //工具名称
'key' => 'MD5', //关键字
'des' => 'MD5加密是一种不可逆的加密算法.<br />支持32位(大/小写字母)和16位(大/小写字母)生成' //描述
);
$query = $_GET['q'];
$type = $_GET['t'];
class HccTools_md5{
var $str, $type;
function str($str, $type = 0){
if($str){
$md5 = md5($str);
$md5_16 = substr($md5,8,16);
switch($type){
case 0: //0 32*大
return strtoupper($md5);
break;
case 1: //1 32*小
return strtolower($md5);
break;
case 2: //2 16*大
return strtoupper($md5_16);
break;
case 3: //3 16*小
return strtolower($md5_16);
break;
default: // 32*大
return strtoupper(md5($str));
}
}else{
return '请输入查询字符串!';
}
}
}
header("Content-type: text/html; charset=utf-8");
$md5 = new HccTools_md5;
define(ToolsUrl, $_SERVER['SERVER_NAME']);
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title><?php echo $Tools_config['name'];?></title>
<link type="text/css" href="HccTools/static/css/HccToolsDefault.css" rel="stylesheet" />
</head>
<body>
<div class="wrap">
<div class="HccToolsMenu">
<ul>
<!--
<li><a href=""><img height="44" src="HccTools/static/images/logo.gif" /></a></li>
<li id="pc"><a href=""><img height="44" src="HccTools/static/images/logo.gif" /></a></li>
-->
<li><a href="//<?php echo ToolsUrl;?>"><?php echo $Tools_config['name'];?></a></li>
<li><a href="http://cdn.hechaocheng.tk/">前端公共库CDN节点</a></li>
<li><a href="http://libs.hechaocheng.tk/">导航-3</a></li>
<li><a href="http://css.hechaocheng.tk/">导航-4</a></li>
<li><a href="http://fonts.hechaocheng.tk/">导航-5</a></li>
</ul>
<div style="float:right">
<a href="//bbs.blsun.net/" target="_blank">社区讨论</a>
</div>
</div>
<div class="HccTools">
<div id="HccItemBar">
<div class="HccTitle"><?php echo $Tools_config['name'];?></div>
<div class="HccSearch">
<form action="//www.haosou.com/s" method="get" accept-charset="UTF-8" onSubmit="document.charset='UTF-8'" target="_blank">
<input type="hidden" name="src" value="lm">
<input type="hidden" name="ls" value="s7a1b733a7b">
<input type="text" name="q" id="q" class="HCC_search" $="true" onClick="this.select();" placeholder="查找资料" autocomplete="off" />
</form>
</div>
</div>
<div class="HccTools1" style="text-align:center;">
<form id="hechaocheng" method="get">
<span style="font-size:16px;vertical-align:middle"></span>
<textarea name="q" onclick="this.select();"><?php if(!empty($query)){echo $query;}else{echo '请输入欲加密的字符串.';}?></textarea>
<div>
<input type="radio" name="t" id="md32l" value="0" <?php if ($type==0) echo "checked ";?>style="vertical-align:middle" /><label for="md32l">32[大]</label>
<input type="radio" name="t" id="md32s" value="1" <?php if ($type==1) echo "checked ";?>style="vertical-align:middle" /><label for="md32s">32[小]</label>
<input type="radio" name="t" id="md16l" value="2" <?php if ($type==2) echo "checked ";?>style="vertical-align:middle" /><label for="md16l">16[大]</label>
<input type="radio" name="t" id="md16s" value="3" <?php if ($type==3) echo "checked ";?>style="vertical-align:middle" /><label for="md16s">16[小]</label>
<input type="submit" class="submit" id="sub" value="加 密" style="vertical-align:middle" />
</div>
</form>
<?php if(!empty($_GET['q'])){?>
<input type="text" style="vertical-align:middle;width:90%;text-align:center" value="<?php echo $md5->str($query,$type);?>" onclick="this.select();" readonly class="input" />
<?php }?>
<div class="HCC_Info"><?php echo $Tools_config['des'];?></div>
<div style=""><a href="///" target="_blank">站长社区</a> <a href="http://www.hechaocheng.tk/" target="_blank">前端公共库</a> <a href="" target="_blank"></a> </div>
©Copyright <a href="//<?php echo ToolsUrl;?>" style="color:#000"><?php echo ToolsUrl;?></a> All Rights Reserved.<br /><a onClick="if(confirm('提示:有\'发广告,睹博,加另一个Q(皮条客),招网络刷单,裸聊,刷单…\'等行为的朋友请勿加群,否则一经发现,直接请出去.')){return true;}else{return false;};" href="http://shang.qq.com/wpa/qunwpa?idkey=cffe2a2cd11a784ad710b879ae697e68dc6a5d599ba21baaa5dbc76779965d23" target="_blank" style="color:#999999">Q群讨论(23189103)</a>
<a href="http://hechaocheng.cn/" target="_blank" style="color:#999" title="阿城守候">Hechaocheng</a>
</div>
</div>
</div>
<div><img alt="返回顶部" src='HccTools/static/images/bg_HccToolsGotop.gif' id='gotop' onclick='javascript:scroll(0,0);'/></div>
<script type="text/javascript" src="HccTools/static/js/similar.min.js"></script>
<div style="display:none"><script type="text/javascript" src="http://xslt.alexa.com/site_stats/js/t/a?url=hechaocheng.tk"></script></div>
<script type="text/javascript">
similar.vote('q', ['MD5查询','在线工具','hechaocheng.tk','站长工具'], '5000');
</script>
</body>
</html>
PHP实例开发源码-MD5在线加密工具 php版.zip
版权申诉
9 浏览量
2022-10-15
13:02:38
上传
评论
收藏 49KB ZIP 举报
易小侠
- 粉丝: 6453
- 资源: 9万+
最新资源
- 基于MIC+NE555光敏电阻的声光控电路Multisim仿真原理图
- python tkinter-08-盒子模型.ev4.rar
- Doozy UI Manager 2023
- 基于matlab实现夜间车牌识别程序(1).rar
- 基于matlab实现无线传感器网络无需测距定位算法matlab源代码 包括apit,dv-hop,amorphous在内的共7个
- 基于python的yolov5实现的旋转目标检测
- 基于matlab实现无线传感器网络 CAB定位仿真程序 这是无线传感器节点定位CAB算法的仿真程序,由matlab完成.rar
- 基于matlab实现图像处理,本程序使用背景差分法对来往车辆进行检测和跟踪.rar
- 基于matlab实现视频监控中车型识别代码,自己写的,希望和大家多多交流.rar
- springcodespringcodespringcodespringcode
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈