WeMartiansAreFriendly Posted September 2, 2008 Posted September 2, 2008 (edited) Here's an update for my original hashing function... It's still based on the same code, but I have improved it quite a bit.Thanks to Dirk Paehl, the author of the hashes.dll, all these hashing functions are possible and.. Thanks to Ward and his Embed machine code UDF, an external dll is no longer necessary, the code from the dll is included and executed from within AutoIt. Hashes supports the following Hashing algorithms MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512 HAVAL128 HAVAL160 HAVAL192 HAVAL224 HAVAL256 GHOST TIGER128 TIGER160 TIGER192 RIPE-MD128 RIPE-MD160 CRC32 CRC16 ARC-CRC.Limitations: I am not the author of the hashes.dll, I can not add any new hashing functions myself, nor can I support you if anything goes wrong, the UDF is of course is open source, but the hashes.dll is not. It is free for non-commercial use.Known Plans: I'm looking to phase out the use of the hashes.dll library and write my own hashing library in c++, with none of the limitations above.Changelog: v1.0a - Sep 1, 2008: Minor fix for _Hashes_Init(), should be roughly 5x faster now. v1.0 - Sep 1, 2008: Initial release.Here's an exampleexpandcollapse popup#include "Hashes.au3" Local $szInput, $szMethod, $szHash Local $nTime = TimerInit() _Hashes_Init() ;---------------------------------------------- ; String test (sha1) $szInput = "The quick brown fox jumps over the lazy dog" ; 2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 $szMethod = $HASHES_SHA1 $szHash = _Hashes_Lib($szInput, $szMethod, False) ConsoleWrite( '_Hashes: ' & $szMethod & " Error: " & @error &" Value: " & $szHash &@lf) ;---------------------------------------------- ; File test (sha1) $szInput = @ScriptFullPath $szMethod = $HASHES_SHA1 $szHash = _Hashes_Lib($szInput, $szMethod, True) ConsoleWrite( '_Hashes: ' & $szMethod & " Error: " & @error &" Value: " & $szHash &@lf) ;---------------------------------------------- ;Multiple method test $szInput = "The quick brown fox jumps over the lazy dog" Local $AV_HASHES_METHODS[21] = _ [ _ $HASHES_MD2,$HASHES_MD4,$HASHES_MD5, _ $HASHES_SHA1,$HASHES_SHA256, $HASHES_SHA384, $HASHES_SHA512, _ $HASHES_HAVAL128,$HASHES_HAVAL160,$HASHES_HAVAL192,$HASHES_HAVAL224,$HASHES_HAVAL256, _ $HASHES_GHOST,$HASHES_TIGER128,$HASHES_TIGER160,$HASHES_TIGER192, _ $HASHES_RIPE_MD128, $HASHES_RIPE_MD160, $HASHES_CRC32, $HASHES_CRC16, $HASHES_ARC_CRC _ ] For $I = 0 To UBound($AV_HASHES_METHODS)-1 Step 1 $szMethod = $AV_HASHES_METHODS[$I] $szHash = _Hashes_Lib($szInput, $szMethod, False) ConsoleWrite( '_Hashes: ' & $szMethod & " Error: " & @error &" Value: " & $szHash &@lf) Next _Hashes_End() ConsoleWrite("time taken: "& TimerDiff($nTime) &@lf) Exithashes.zip Edited September 2, 2008 by mrRevoked Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
AdmiralAlkex Posted September 2, 2008 Posted September 2, 2008 This is great!! There is only one thing I am not clear about, when you say it is only for home use do you mean it can't be distributed for non-commercial purposes?? .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
WeMartiansAreFriendly Posted September 2, 2008 Author Posted September 2, 2008 This is great!! There is only one thing I am not clear about, when you say it is only for home use do you mean it can't be distributed for non-commercial purposes?? I rephrased that part. I suppose it means you can't use it in a commercial environment or try to sell it. Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
AdmiralAlkex Posted September 2, 2008 Posted September 2, 2008 I rephrased that part. I suppose it means you can't use it in a commercial environment or try to sell it. I think I understands now, thx for a great script and answering my question .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Ward Posted September 5, 2008 Posted September 5, 2008 Very nice! I like it~ 新版 _ArrayAdd 的白痴作者,不管是誰,去死一死好了。
LynnS Posted April 13, 2011 Posted April 13, 2011 Is there a secret to getting this to work in Windows 7? Even with the #RequireAdmin included in the Example.au3 code, I cannot get this to work. It appears to access all of the include files correctly, but no hash info is ever generated. Has anyone come up with an easier way to generate a SHA512 hash since the posting of this code in 2008?
spudw2k Posted April 15, 2011 Posted April 15, 2011 (edited) Did you check the _Crypt_HashData() Func in the HelpFile?nm, It doesn't support SHA512. Edited April 15, 2011 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
KaFu Posted April 15, 2011 Posted April 15, 2011 Check out Ward's AutoIt Machine Code Algorithm Collection - Checksum, Compression, Encoding and Hash, Both X86/X64 Supported... btw, the link is EXACTLY above your post. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now