Jump to content

CornedBeef Hash (UDF)


willichan
 Share

Recommended Posts

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 by willichan
Fixed typo
Link to comment
Share on other sites

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 by willichan
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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)

userbar.png

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by spudw2k
Link to comment
Share on other sites

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.

 

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
 Share

×
×
  • Create New...