I was curious about which hashing method usable by PHP's crypt function provides the longest output, and also, if the length of the output was relative at the chance of their being a collision of two hashes.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
See this comment on the PHP docs for
hash()
:So, the longest would be sha512 or whirlpool. Since you mentioned
crypt()
, you're down toCRYPT_SHA512
, but you don't necessarily need to use it if you havehash()
available.