Need some help. I am not versed in hashing and just started programming with PHP and currently need to hash some strings but required it to be unique. Found that OpenSSL can hash with SHAKE128 but without the option to select the lengths of the output. Notice that every openssl_digest function with shake128 hash output is 256 character by default, can I just take the first 20 character to use since I notice only the last few characters are appended with each length change? shake128 hash "hello" example:
5 byte - 8eb4b6a932
6 byte - 8eb4b6a932f2
7 byte - 8eb4b6a932f280
8 byte - 8eb4b6a932f28033
16 byte - 8eb4b6a932f280335ee1a279f8c208a3
Appreciate your insight. Thank you.