I would like to map strings of arbitrary length to hashes of 10 character length.
The length of the alphabet is of 64 characters (0-9, A-Z, a-z, _, -).
Obviously 2 same strings must produce the same hash.
I have the following doubts:
With 64 characters and a hash length of 10 characters I have a number of combination of
64^10 = 1,15*10^18
. How long would it require for a modern computer to crack it?To guarantee that 2 same strings produce the same hash I was thinking to apply a SHA function to the string and then truncate the output to 60 bits (
64 = 2^6
). In this case, which SHA function should I use and why? And what's the collision probability in such case?