I need an hash algorithm that outputs an alphanumeric string that is max 20 characters long. For \"alphanumeric\" I mean [a-zA-Z0-9]
.
Inputs are UUIDs in ca
Just clip the characters you don't need from the hash of the GUID. With a good hash function, the unpredictability of any part of the hash is proportional to the part's size. If you want, you can encode it base 32 instead of the standard hex base 16. Bear in mind that this will not significantly improve entropy per character (only by 25%).
For non-cryptographic uses, it does not matter whether you truncate MD5, SHA1 or SHA2. Neither has any glaring deficiencies in entropy.