ADMPV

librhash

5 posts in this topic

#1 ·  Posted (edited)

https://sourceforge.net/projects/rhash/

librhash.dll - supports CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, Tiger, TTH, Torrent BTIH, AICH, ED2K, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R 256/512, WHIRLPOOL and SNEFRU hash sums.

faster than _Crypt_HashFile about 2 times

librhash.au3, librhash.dll in archive

Changelog:

        2017-07-11 Added: rhash_timer_start, rhash_timer_stop
                   Changed: DLL - rhash_run_benchmark_mod - passing file as HANDLE
        2017-07-07 Changed: rhash_ex()
                   Added: DLL - rhash_run_benchmark_mod
        2017-07-04 Changed rhash_ex()

 

librhash_134.zip

Edited by ADMPV
2 people like this

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Thanks for sharing this. Could you add an Enum for the hash_id ?, it'll make it easier to use. 
 

rhash_ex()
Func rhash_ex()

    Local $hash_id = $RHASH_MD5

    rhash_library_init()

    MsgBox(262144, "rhash_get_hash_length", rhash_get_hash_length($hash_id))
    MsgBox(262144, "rhash_file", rhash_file($hash_id, 'librhash.dll'))
    MsgBox(262144, "rhash_count", rhash_count())
    MsgBox(262144, "rhash_get_digest_size", rhash_get_digest_size($hash_id))
    MsgBox(262144, "rhash_get_name", rhash_get_name($hash_id))

    Local $file = FileOpen("librhash.dll", 16)
    MsgBox(262144, "rhash_msg", rhash_msg($hash_id, FileRead($file)))

EndFunc   ;==>rhash_ex

Yep,  I did not understand the example.

Edited by argumentum
correct myself

Share this post


Link to post
Share on other sites

#3 ·  Posted

; #FUNCTION# ====================================================================================================================
; RHASH_API Example
; md5(librhash.dll) = 0x3A11F6C700A5903CEB104C4971DCB3A1
; ===============================================================================================================================
Func rhash_ex()

  Local $hash_id = $RHASH_WHIRLPOOL
  Local $s, $file

  rhash_library_init()

  $s  = "rhash_count = " & rhash_count() & @CRLF
  $s &= "$hash_id = " & $hash_id & @CRLF
  $s &= "rhash_get_name = " & rhash_get_name($hash_id) & @CRLF
  $s &= "rhash_get_hash_length = " & rhash_get_hash_length($hash_id) & @CRLF
  $s &= "rhash_get_digest_size = " & rhash_get_digest_size($hash_id) & @CRLF
  $s &= "rhash_file = " & rhash_file($hash_id, 'librhash.dll') & @CRLF
  $file = FileOpen("librhash.dll", 16)
  $s &= "rhash_msg = " & rhash_msg($hash_id, FileRead($file)) & @CRLF

  MsgBox(0, "rhash", $s)

EndFunc   ;==>rhash_ex

; Uncomment next line to run example
rhash_ex()

 

Share this post


Link to post
Share on other sites

#4 ·  Posted

maybe someone know how to pass FILE* to C++ dll

RHASH_API void rhash_run_benchmark(unsigned hash_id, unsigned flags, FILE* output);

"handle" crashes

Share this post


Link to post
Share on other sites

#5 ·  Posted

Intel(R) Pentium(R) D CPU 3.40GHz + 3Gb RAM

CRC32 2048 MiB total in 3.887 sec, 526.917 MBps
MD4 2048 MiB total in 2.221 sec, 922.157 MBps
MD5 2048 MiB total in 3.543 sec, 578.038 MBps
SHA1 2048 MiB total in 13.992 sec, 146.369 MBps
TIGER 2048 MiB total in 26.988 sec, 75.887 MBps
TTH 2048 MiB total in 31.240 sec, 65.557 MBps
BTIH 2048 MiB total in 14.107 sec, 145.174 MBps
ED2K 2048 MiB total in 2.250 sec, 910.213 MBps
AICH 2048 MiB total in 14.123 sec, 145.015 MBps
WHIRLPOOL 256 MiB total in 12.197 sec, 20.990 MBps
RIPEMD-160 2048 MiB total in 9.321 sec, 219.711 MBps
GOST 1024 MiB total in 20.129 sec, 50.871 MBps
GOST-CRYPTOPRO 1024 MiB total in 20.204 sec, 50.684 MBps
HAS-160 2048 MiB total in 4.539 sec, 451.199 MBps
SNEFRU-128 256 MiB total in 8.305 sec, 30.825 MBps
SNEFRU-256 256 MiB total in 12.088 sec, 21.177 MBps
SHA-224 2048 MiB total in 22.861 sec, 89.586 MBps
SHA-256 2048 MiB total in 22.931 sec, 89.313 MBps
SHA-384 1024 MiB total in 62.102 sec, 16.489 MBps
SHA-512 1024 MiB total in 62.488 sec, 16.387 MBps
EDON-R256 2048 MiB total in 6.897 sec, 296.931 MBps
EDON-R512 2048 MiB total in 20.182 sec, 101.475 MBps
SHA3-224 256 MiB total in 10.994 sec, 23.285 MBps
SHA3-256 256 MiB total in 11.782 sec, 21.727 MBps
SHA3-384 256 MiB total in 15.198 sec, 16.845 MBps
SHA3-512 256 MiB total in 22.180 sec, 11.542 MBps

 

1 person likes this

Share this post


Link to post
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

  • Similar Content

    • dany
      By dany
      Identicon.au3 v0.8

      A simple UDF to create identicons or visual representations of any hash value. Based on Don Park's original Identicon program.

      Main features:
      3x3 and 4x4 grid patterns. Aside from rotational symmetry there are also checkerboard and Space Invader (mirror symmetry) patterns. Adapted to handle hashes up to SHA512. Save as PNG, JPG, GIF or BMP identicons. Alpha-transparency support for PNG. The UDF and a demo:Identicon.au3
      Identicon-Demo.au3


      Version 0.8: * Initial public release.
      To do:

      * In the checkerboard pattern there is a bias for diamond shapes. * Improve image saving, BMP, GIF and JPG suck, much artifacts and dithering. * Transparency doesn't work with GIF (and BMP?) due to the wrong Bitmap format. * Add some more unique sprite shapes and preferably cap the shape arrays at powers of two as BitAND is faster than a modulus operation.
    • UEZ
      By UEZ
      Hi,

      here a little tool to create ISO files from default ISO 9660 (2048 bytes/sector) CD or DVD format (no audio cd and BD support yet!)






      Source is too huge for code box -> Look here to have a look to the source code



      Additional credits to:
      Ward for MD5 checksum / MemoryDLL routines
      Harald Vistnes for cd2iso used in v1 and v2
      Yashied for WinAPIEx.au3
      wolf9228 to play wave from memory
      AutoItObject Team


      Download (purely written with AutoIt): ISO Creator v1.16 build 2012-09-11 beta.7z (367 downloads previously)
      Thanks to smashly for pointing me to right direction



      The development of v1 and v2 is discontinued!

      Download v1: ISO Creator v1.0.0 build 2011-08-03 beta v1.7z (195 downloads previously)
      Download v2 (everything is called directly from memory): ISO Creator v1.0.0 build 2011-08-03 beta v2.7z (117 downloads previously)
      Thanks to smartee for the DLL version (experimental) of cd2iso!

      v1 is using cd2iso.exe to create the ISO
      v2 is using cd2iso.dll which was created by smartee.


      For compiled v1, v2 and pure AutoIt versions only (x86) visit (ISO Creator Exe only): 4shared.com or MediaFire


      You can call ISO Creator.exe also with command line parameters: ISO Creator.exe -s [source cd/dvd drive] -d [filename] (-md5) (-aem) (-exit)
      -s and -d are mendatory if called from command line!


      Tested on Win7 x64.

      If you find any bug please report here!


      Many thanks to smartee and smashly for their efforts on this project!


      Br,
      UEZ


      Change Log:



    • Mechaflash
      By Mechaflash
      _AutoMD5 allows you to input a string password and it outputs an md5 hash for you. It also allows you to test it via a pseudo GUI login.

      At the end of the script, it outputs the MD5 encrypted string as well as the source code for a simple autoit login prompt in a txt file.

      Notice in the source output, _Get_Stored_Encrytped_Password() is whatever method you use to store the original encrypted password. I.E. you create the encrypted password and store it in an INI file. Replace _Get_Stored_Encrypted_Password() with a function that's made to retireve it from the INI file.