I’m in the process of developing a CMS system which will run my clients sites, but I’ve come to a situation I tried to avoid.
The hash() function requires PHP >= 5.1.2, and I obviously can’t assume that all clients run this, since I won’t handle everyones hosting.
Hence, I’m choosing between:
- Sticking with SHA1 only – less security
- Using SHA512 when available, otherwise SHA1 – bad compability when
it’s time for server upgrades - Using SHA512 only – forcing the client to upgrade ASAP (bad – not
always they can)
I’m appreciating all input!
Really?!
Running PHP < 5.1.2 means, that it is at least (!) 6 years old and thus a security issue by itself. The question which hash algorithm is more or less secure is not important anymore.
Regarding the question:
sha1()(with salt) works fine for most use-cases, unless you write software for the CIA or such. The point is, that even saltedmd5()-hash isn’t worth to get cracked on most sites.When they deny to update a 6 years old software, they are doomed anyway…