adding SHA256 and SHA512 support
Also, can we make sha256 the default Hash too? (i can do this in a separate pr)
Hi @Jayflux,
Why do you want SHA265 and SHA512 support? It doesn't really offer much of an advantage as a hashing function, and the cryptographic aspect of it is outside the scope of this project.
As to making it the default, MD5 is the default because it is fast. I added SHA1 to improve the collision chances and because it isn't much slower. I am open to different hashing algorithms, but they need to offer an advantage over what is already there.
@cnf collision is much less likely to happen in SHA 256 than in SHA 1 / MD5 SHA 256 is supported in hardware so i doubt you would see much of a difference in speed comparatively.
The fact that these are additions and are optional to use, could this decision (speed over collision likelihood) be left up to the user of this package? I will be using this over a large dataset, so am personally happy to trade some speed over less chance of collisions.
Hi @Jayflux, I'll be traveling for work the coming days, and I need some time to go over this. It might be a while before I respond further, but I will get back to it.
Also, for now please see https://github.com/cnf/structhash/issues/12
Ok cheers If it makes it easier i can remove the 512, as i just need the 256 for now