Well, I have a code system, but my hashing algoritem just gets a new code, and doesn't care about collsiions. That doesn't really matter, though, because the only thing I hash is usernames, so w/e. I'm sure that would run sorta-fast if you took out the sleep statements. the 0.001 will acually sleep for 0.1, the minimum sleep. The only way to get around that, and not have it kill the loop for taking to much time, is to use a timer, that has 0.0 for it's delay, that kills itself when done. That is REALLY tedious, though, and uses global variables, or a gamecache, or whatever. I use JassShopPro, so I can make whatever globals I want, though, so that isn't a huge limitation for me. Anyway, if you do it like that, it would lock the game up, until it is done hashing. BTW, I was about to work on an MD5, but this should do, with a little touching up! GJ!
SHA1 (an hashing algorithm)
not ratedSimply use SHA1core("{binary string}")
Given an ascii binary code, it will return the true SHA-1 as per FIPS #180-2 (also in NIST records).
The SHA1 code generates a 160 bit hash expressed as five 32-bit hexadecimal words.
Due to constraints on strings, I am unsure of how this would work with binary strings of length 1024 or greater, in fact, I am unsure if 1024 characters is possible. Regardless, this will compute any string of length 448 or fewer characters. According to SHA-1 standards, a 64 bit expression of the length of the message input must be appended. Additionally, this message is analyzed as a series of 512 bit chunks.
If anybody cares to write any optimization code, aside from the alternate SHA-1 format provided in FIPS #180-2 (which provides no benefit to calculation time or noticable measure against string leakage), then I request that code be submitted as a comment.
Thank you.
(Edited the comments into //comments. Sorry)
Given an ascii binary code, it will return the true SHA-1 as per FIPS #180-2 (also in NIST records).
The SHA1 code generates a 160 bit hash expressed as five 32-bit hexadecimal words.
Due to constraints on strings, I am unsure of how this would work with binary strings of length 1024 or greater, in fact, I am unsure if 1024 characters is possible. Regardless, this will compute any string of length 448 or fewer characters. According to SHA-1 standards, a 64 bit expression of the length of the message input must be appended. Additionally, this message is analyzed as a series of 512 bit chunks.
If anybody cares to write any optimization code, aside from the alternate SHA-1 format provided in FIPS #180-2 (which provides no benefit to calculation time or noticable measure against string leakage), then I request that code be submitted as a comment.
Thank you.
(Edited the comments into //comments. Sorry)