<?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
版权申诉
113 浏览量
2023-08-27
23:49:20
上传
评论
收藏 49KB ZIP 举报
毕业_设计
- 粉丝: 1924
- 资源: 1万+
最新资源
- 嵌入式基础学习资料0000
- content_1714465331721.xls
- HM3401-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- Chainbase+Web3+APi+Data warehouse
- HM3401D-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- GEE案例-1990-2023年计算某个区域的NDVI时序变化轨迹(以徐州市为例)含全部代码.pdf
- HM3401C-VB一款P-Channel沟道SOT23的MOSFET晶体管参数介绍与应用说明
- 沈丘盛世龙门图纸符合规范化
- 基于51单片机带LCD1602显示+温度补偿的超声波测距仪设计软硬设计+仿真+文档资料.zip
- 一、K210是什么? K210全称为堪智K210,是嘉楠科技自主研发的一款采用RISC-V处理器架构,具备视听一体、自主IP内核
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈