ssmc Posted October 31, 2011 Share Posted October 31, 2011 Great! Thank You! Link to comment Share on other sites More sharing options...
stg68 Posted May 17, 2012 Share Posted May 17, 2012 Hello! I have tried “MD5FileTest.au3” and I have one question: When I check MD5 for curl.exe via “MD5FileTest.au3” it gives me the following: 0x04E7677C97AF7E4B8BD1E8D0C9752B1A When I check via “md5sums.exe” PC-Tools utility it gives me the following: 04E7677C97AF7E4B8BD1E8D0C9752B1A I am not a big expert .. so my question is: To present MD5 for curl.exe and others can I just trim 0x and report the rest 04E7677C97AF7E4B8BD1E8D0C9752B1A Is it a problem? Thank you! Link to comment Share on other sites More sharing options...
Ward Posted May 18, 2012 Author Share Posted May 18, 2012 This function return the binary data, not a string. If you convert binary data to hex string by String() or show it using MsgBox(), it started with "0x". Since "0x" it not a part of MD5, of course you can trim it. 新版 _ArrayAdd 的白痴作者,不管是誰,去死一死好了。 Link to comment Share on other sites More sharing options...
stg68 Posted May 18, 2012 Share Posted May 18, 2012 Thank you Ward! Link to comment Share on other sites More sharing options...
n3wbie Posted January 11, 2017 Share Posted January 11, 2017 Can Someone provide me download link for this! links in initial thread are dead! Link to comment Share on other sites More sharing options...
argumentum Posted January 13, 2017 Share Posted January 13, 2017 On 1/11/2017 at 4:54 AM, n3wbie said: Can Someone provide me download link for this! links in initial thread are dead! from 2008, OP is no longer at the forums. Good luck. SHA1_MD5_RC4_BASE64_CRC32_XXTEA.zip n3wbie 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Biatu Posted January 13, 2017 Share Posted January 13, 2017 I *think* this is 2010 version. AutoIt Machine Code Algorithm Collection.zip n3wbie 1 What is what? What is what. Link to comment Share on other sites More sharing options...
jchd Posted April 16, 2017 Share Posted April 16, 2017 Just a quick note: it would be more efficient to change the 4 declarations from Local $Opcode to Static $Opcode. That would be a tiny speedup when encode or decode functions are called repeatedly. Also, don't forget to switch strings to/from UTF8 if you suspect they might contain anything else than your local codepage. The test script once made Unicode-compatible becomes: ; ----------------------------------------------------------------------------- ; Base64 Machine Code UDF Example ; Purpose: Provide Machine Code Version of Base64 Encoder/Decoder In AutoIt ; Author: Ward ; ----------------------------------------------------------------------------- #Include "Base64.au3" Local $Encode = _Base64Encode(BinaryToString(StringToBinary("The quick brown fox jumps over the lazy ɖɘɠɥლოჸᴟ⁈ℕℤℚℝℂℍℙ∑∀∋≢≰⋟⋞⟪⟫ dog", 4), 1)) MsgBox(0, 'Base64 Encode Data', $Encode) Local $Decode = _Base64Decode($Encode) MsgBox(0, 'Base64 Decode Data (Binary Format)', $Decode) Local $String = BinaryToString($Decode, 4) MsgBox(0, 'Base64 Decode Data (String Format)', $String, 4) argumentum 1 This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Pauli Posted October 2, 2019 Share Posted October 2, 2019 On 4/16/2017 at 9:56 AM, jchd said: Also, don't forget to switch strings to/from UTF8 if you suspect they might contain anything else than your local codepage. The test script once made Unicode-compatible becomes: If it helps somebody, here is a version of the encoding / decoding autoit code to handle UTF-8 non-latin strings correctly. The original library is not able to do it: expandcollapse popup#include <WinAPI.au3> Global Const $CP_UTF8 = 65001 ;This is the function in Base64.au3 ; please note the line converting UTF8 characters to multibyte sequence: Func _Base64Encode($Data, $LineBreak = 76) Local $Opcode = "0x5589E5FF7514535657E8410000004142434445464748494A4B4C4D4E4F505152535455565758595A6162636465666768696A6B6C6D6E6F707172737475767778797A303132333435363738392B2F005A8B5D088B7D108B4D0CE98F0000000FB633C1EE0201D68A06880731C083F901760C0FB6430125F0000000C1E8040FB63383E603C1E60409C601D68A0688470183F90176210FB6430225C0000000C1E8060FB6730183E60FC1E60209C601D68A06884702EB04C647023D83F90276100FB6730283E63F01D68A06884703EB04C647033D8D5B038D7F0483E903836DFC04750C8B45148945FC66B80D0A66AB85C90F8F69FFFFFFC607005F5E5BC9C21000" Local $CodeBuffer = DllStructCreate("byte[" & BinaryLen($Opcode) & "]") DllStructSetData($CodeBuffer, 1, $Opcode) ; here is the changed functionality to handle UTF8: ; $Data = Binary($Data) $Data = Binary(_WinAPI_WideCharToMultiByte($Data, $CP_UTF8)) Local $Input = DllStructCreate("byte[" & BinaryLen($Data) & "]") DllStructSetData($Input, 1, $Data) $LineBreak = Floor($LineBreak / 4) * 4 Local $OputputSize = Ceiling(BinaryLen($Data) * 4 / 3) $OputputSize = $OputputSize + Ceiling($OputputSize / $LineBreak) * 2 + 4 Local $Ouput = DllStructCreate("char[" & $OputputSize & "]") DllCall("user32.dll", "none", "CallWindowProc", "ptr", DllStructGetPtr($CodeBuffer), _ "ptr", DllStructGetPtr($Input), _ "int", BinaryLen($Data), _ "ptr", DllStructGetPtr($Ouput), _ "uint", $LineBreak) Return DllStructGetData($Ouput, 1) EndFunc ;================================ ; and this is the way to decode : $Decrypt = _Base64Decode($Encrypt) MsgBox(0, '', $Decrypt) MsgBox(0, '', _WinAPI_MultiByteToWideChar ( BinaryToString($Decrypt), $CP_UTF8, 0, True ) ) Hope this helps you 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