gammasts Posted June 13, 2005 Share Posted June 13, 2005 (edited) Here is a dll and autoit functions for hashing strings and files using Sha-1. Func _Sha1($string) $result = DllCall("au3sha1.dll", "str", "HashString", "str", $string) return $result[0] EndFunc Func _Sha1File($file) $result = DllCall("au3sha1.dll", "str", "HashFile", "str", $file) if $result = 0 Then SetError(1) EndIf return $result[0] EndFunc Original code in C++ from Dominik Reichl at code project. Changed to a dll for usage of AutoIt by gammasts and ZeqMacaw. Let me know if you want the dll source code. Edit: Added the error for the file to it. It will return error 1 if the file is not found. Have fun hashing.au3sha1.dllau3sha1.au3 Edited June 13, 2005 by gammasts Link to comment Share on other sites More sharing options...
mr.underperson Posted May 25, 2006 Share Posted May 25, 2006 Yes! I'd love to see the C source! Where can I get it? -mu Link to comment Share on other sites More sharing options...
gammasts Posted May 28, 2006 Author Share Posted May 28, 2006 Hey, It's been a long time since I've browsed the forums. I'll try to find the source code for it, I probably still have it somewhere. If you can send me an IM on MSN or something, or just PM to remind me. Link to comment Share on other sites More sharing options...
mr.underperson Posted May 29, 2006 Share Posted May 29, 2006 No worries, I found a C++ implementation of the SHA1 algorithm and slotted it (like it was that easy!) into my current favourite hashing dll (md5.dll from JSThePatriot) which works as an AutoIt plugin (no dllcall) ...http://www.autoitscript.com/forum/index.ph...pic=21010&st=44I'm still curious to see it (I'm just starting with C, so all working examples are useful) but if you don't find it, it's no biggie.-mu Link to comment Share on other sites More sharing options...
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