找回密码
 加入
搜索
查看: 3412|回复: 5

[效率算法] 关于MD5转换[已解决]

[复制链接]
发表于 2010-9-23 04:01:49 | 显示全部楼层 |阅读模式
本帖最后由 无名蜘蛛 于 2010-9-23 05:31 编辑

搞了半天也只能让它弹出窗口,却不能让它在当前窗口显示,还有就是我想让他不显示0X才好复制
#include<GUIConstants.au3>
#include <ACN_HASH.au3>
$winman = GUICreate("编码转换",450,400,-1,-1)
$md51 = GUICtrlCreateLabel("明文密码:",10,25,60,25)
$md52 = GUICtrlCreateInput("",70,20,125,25)
$md53 = GUICtrlCreateLabel("转换后",200,25,50,25)
$md54 = GUICtrlCreateInput("",240,20,125,25)
$button1 = GUICtrlCreateButton("转成MD5",370,20,80,25)

GUISetState()
While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case        $GUI_EVENT_CLOSE
                        Exit
                Case        $button1
                        $md55 = GUICtrlRead($md52)
                        $md56 = _MD5($md55)
                        MsgBox(0,"MD5",$md56)
        EndSwitch
WEnd

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

 楼主| 发表于 2010-9-23 05:03:12 | 显示全部楼层
搞定了一点
GUICtrlSetData($md54,$md56)
可以在框里输入了,还有一点是不知道怎么去除0x
发表于 2010-9-23 05:12:58 | 显示全部楼层
#include<GUIConstants.au3>
#include <ACN_HASH.au3>

$winman = GUICreate("编码转换", 450, 400, -1, -1)
$md51 = GUICtrlCreateLabel("明文密码:", 10, 25, 60, 25)
$md52 = GUICtrlCreateInput("", 70, 20, 125, 25)
$md53 = GUICtrlCreateLabel("转换后", 200, 25, 50, 25)
$md54 = GUICtrlCreateInput("", 240, 20, 125, 25)
$button1 = GUICtrlCreateButton("转成MD5", 370, 20, 80, 25)

GUISetState()

While 1

        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $button1
                        $md55 = GUICtrlRead($md52)
                        $md56 = StringReplace(_MD5($md55), '0x', '')
                        GUICtrlSetData($md54, $md56)
        EndSwitch
WEnd

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

 楼主| 发表于 2010-9-23 05:30:46 | 显示全部楼层
回复 3# 破帽遮颜


    谢谢,关于正则表达式看来是不得不学啊。。。。。。
发表于 2010-9-23 08:46:30 | 显示全部楼层
其实也可以这样
$md56 = StringTrimLeft(_MD5($md55),2)

评分

参与人数 1金钱 +15 收起 理由
afan + 15

查看全部评分

发表于 2010-9-23 10:31:45 | 显示全部楼层
回复 4# 无名蜘蛛
破帽兄似乎用的是StringReplace函数吧,貌似和正则没有关系。
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-21 01:43 , Processed in 0.073645 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表