128 bit hash without collisions guaranteed
问题 Is there a 128 hashing algorithm (no matter if it is a crypto or non-crypto hashing) that guarantee no collision could occur? If can guarantee my string would not exceed a specific length (is there such length? - I can guarantee a length less than 100 chars) Thanks, J.B 回答1: No you can't make such an algorithm. If you have a string with 100 characters, you have (let character be in 1..255 range) 256**100 == (2**8)**100 == 2**800 different strings (pontential collisions); 128 bit hash function