- Nov 9, 2009
- 448
- 0
- 71
This question mainly applies to PHP, but can be generalized to any programming language....
Given any string of any length, is there any methods available to guarantee a fixed-length alphanumeric unique identifier by operating on that string?
I know base64 encode does the trick, but is variable length.
Both CRC32 and MD5 hashes are fixed-length and doesn't guarantee uniqueness but does a pretty good job.
Given any string of any length, is there any methods available to guarantee a fixed-length alphanumeric unique identifier by operating on that string?
I know base64 encode does the trick, but is variable length.
Both CRC32 and MD5 hashes are fixed-length and doesn't guarantee uniqueness but does a pretty good job.
