Anavrins, on 29 March 2016 - 02:23 PM, said:
LoganDark, on 29 March 2016 - 02:03 PM, said:
Anavrins, on 19 February 2016 - 09:41 PM, said:
With some rough speed test I could only get up to 105 hash/sec, my implementation was able to get to 1500 hash/sec.
It's still not much compared to say, gpus, but it's quite something for CC.
I also noticed the same thing as Shazz, that any input that's (64*n)+55 bytes in length will produce the incorrect hash, I didn't go deep into the problem, but I know it's the pre-processing part that produces an incorrect padding.
That bug is not present in my implementation.
Here's the pastebin: 6UV4qfNF
It seems I'm having a little bit of an error trying to run your SHA algorithm after having an upcoming project of mine mostly finished.
Edit: just using sha256("msg")
In any case you can replace the bit32 parts with bit, though I haven't tested it.
Edit: bit doesn't have a bad lshift
edit 2: I'll copy the functions from the bit32 API and put them in your hashing function. It should fix issues with older versions.
edit 3: not needed, bit does have a blshift but not an lshift.
edit 4: too long without yielding
Edit 5: I'm using the original API because it works on older versions. It may not be as fast, but that's the compromise you have to make when nobody considers the older versions...
Edited by LoganDark, 29 March 2016 - 02:36 PM.