Jump to content

MD5 Hash Generator


logmein
 Share

Recommended Posts

Try it!

#Region;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=Md5.ico
#AutoIt3Wrapper_outfile=MD5HashGen-1.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_Res_Description=Huynh Minh Thanh
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=(c) Huynh Minh Thanh
#EndRegion;**** Directives created by AutoIt3Wrapper_GUI ****

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <MD5.au3>

#Region ### START Koda GUI section ### Form=C:\Program Files\Forms\md5hashgen.kxf
$Form = GUICreate("MD5 Hash Generator 1.0", 449, 326, 193, 125)
$Edit = GUICtrlCreateEdit("", 8, 32, 433, 201, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL))
GUICtrlSetData(-1, "")
GUICtrlSetLimit (-1,1024)
$Label1 = GUICtrlCreateLabel("Enter your text here : (max : 1024 chars)", 8, 8, 192, 17)
$gen = GUICtrlCreateButton("&Generate", 8, 240, 75, 25, 0)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Group1 = GUICtrlCreateGroup("MD5 Hash", 8, 268, 433, 51)
$result = GUICtrlCreateInput("", 16, 292, 385, 21, BitOR($ES_AUTOHSCROLL,$ES_READONLY))
$copy = GUICtrlCreateButton("&Copy", 401, 291, 35, 25, 0)
GUICtrlSetTip (-1,'Copy to Clipboard')
GUICtrlCreateGroup("", -99, -99, 1, 1)
$about = GUICtrlCreateButton("&About", 88, 240, 75, 25, 0)
$exit = GUICtrlCreateButton("&Exit", 368, 240, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $gen
            GUICtrlSetData ($result,'')
            If GUICtrlRead ($Edit) <> '' Then
                $md5 = MD5 (GUICtrlRead ($Edit))
                If not @error Then
                    GUICtrlSetData ($result,StringUpper ($md5))
                Else
                    MsgBox (16,'MD5 Hash Generator','Error occured! Please try again!')
                EndIf
            Else
                MsgBox (32,'MD5 Hash Generator','Please enter your text!')
            EndIf
        Case $exit
            Exit
        Case $copy
            If GUICtrlRead ($result) <> '' Then
                ClipPut (GUICtrlRead ($result))
            EndIf
        Case $about
            MsgBox(262208, "About", _
                "MD5 HASH GENERATOR" & @LF & _
                "v 1.0" & @LF & @LF & _
                "---------------" & @LF & _
                "Designer & Coder : Huynh Minh Thanh" & @LF & _
                "Website : http://minhthanhssoftwares.blogspot.com" & @LF & _
                "Email : minhthanh.autoit@gmail.com" & @LF & _
                "---------------" & @LF & _
                "Special Thanks to :" & @LF & _
                "Ward - autoitscript.com/forum" & @LF & _
                "", 0)
                
    EndSwitch
WEnd

Comments are welcome!!!

Link to comment
Share on other sites

Yes, please specify Which MD5 library you chose to use in this example.

...

Seeing as it's MD5(...), I'm guessing you're using the one by SvenP/Frez Systems Ltd. or someone else's.

Ward's current MD5 funcs are (to my knowledge):

MD5.au3 -> _MD5(...), _MD5Init, _MD5Input,_MD5Result, and last but not least - Hash*.au3 -> _Hash("MD5",...)

Arses made a MD5.au3 -> _StringMD5(...) function but it doesn't seem to return the same results on Au3.3.0.0 as standard MD5's - if it was ever meant to. (it was written for 3.2.5.0 anyway, so it may need changes)

MSLx Fanboy StringMD5.au3 -> MD5_String(...)

Edit:

or Erifash's MD5.au3 -> _md5(...)

And many more ...

Take your pick.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...