Jump to content

UDF: Sha1 Hashing


Recommended Posts

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]

Func _Sha1File($file)
    $result = DllCall("au3sha1.dll", "str", "HashFile", "str", $file)
    if $result = 0 Then
    return $result[0]

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.



Edited by gammasts
Link to comment
Share on other sites

  • 11 months later...


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

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) ...


I'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.


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

  • Recently Browsing   0 members

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