willichan Posted October 6, 2023 Posted October 6, 2023 (edited) A reasonably speedy and overly simplistic hash generator (definately not a cryptographic hash) I had a minor project that I didn't feel like putting in the effort to use any recognized hashing algorithm, so I made this one as a quick and dirty, just "for sh*ts and giggles" algorithm. Useable, but don't take it seriously. Maybe just an example of how you can compartmentalize your UDF and avoid using global variables. CornedBeefHash.au3 Edited October 9, 2023 by willichan Fixed typo TheDcoder, taurus905 and mLipok 3 My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash
TheDcoder Posted October 6, 2023 Posted October 6, 2023 Have you tested this algorithm for collisions? EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
willichan Posted October 6, 2023 Author Posted October 6, 2023 (edited) It is a quick and dirty hash, but I have not had any issues with it. I ran a bunch of random Lorem Ipsum paragraphs through it. Feel free to bash at it with any testing you would like to throw at it. I would be curious to see what you find. It boils down to a 4-way 8-bit XOR calculation, so . . . don't try using it for security hashing purposes. Edited October 6, 2023 by willichan My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash
taurus905 Posted October 7, 2023 Posted October 7, 2023 This is a nice example of how to compartmentalize your UDF and avoid using global variables. I would suggest a simple example script on how to use the six functions. I'm sure others would like to see it in action. _CornedBeef_Add _CornedBeef_Destroy _CornedBeef_Hash _CornedBeef_Initialize _CornedBeef_Read _CornedBeef_Reset taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
TheSaint Posted October 9, 2023 Posted October 9, 2023 Thanks for sharing. Will check it out. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
willichan Posted October 12, 2023 Author Posted October 12, 2023 On 10/6/2023 at 10:18 PM, taurus905 said: I would suggest a simple example script on how to use the six functions. I will try to bang out an example script soon. taurus905 1 My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash
spudw2k Posted October 12, 2023 Posted October 12, 2023 (edited) Just a couple of observations to share after playing around: Consecutive chars or a repeated strings seem to undo the hash and possibly reveal the seed (unless a different seed is used each time). e.g. "AA" "ABAB" "DEADBEEFDEADBEEF" 9223372036854775807 and -9223372036854775807 seem to be the largest positive and lowest negative seed values. Anything above or below that range generates the same hash max/min seed values. Edited October 12, 2023 by spudw2k TheDcoder 1 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
willichan Posted October 19, 2023 Author Posted October 19, 2023 On 10/11/2023 at 8:55 PM, spudw2k said: Just a couple of observations to share after playing around: Consecutive chars or a repeated strings seem to undo the hash and possibly reveal the seed (unless a different seed is used each time). e.g. "AA" "ABAB" "DEADBEEFDEADBEEF" 9223372036854775807 and -9223372036854775807 seem to be the largest positive and lowest negative seed values. Anything above or below that range generates the same hash max/min seed values. Thank you. I appreciate the efforts you put in to testing it out. This just illustrates why I said that it is not for cryptographic use, is just "for sh*ts and giggles", and that it is "Useable, but don't take it seriously." 🙃 I used this more for making quick file or data comparisons. It does that in its lazy-man's quick and dirty fashion. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash
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