perl -e 'print ((16**12 >= 50*10**6) ? "Yes" : "No")'
Answer:
Yes
You get max 16**12 = 281474976710656 different values with 12 hex-digits which is far more then 50000000.
Cutting down SHA1 or MD5 to 12-digits will increase the possibility of collisions a lot. Can you not try to use a longer string or use binary?
In reply to Re^3: Question: Generate unique/random 12-digit keys for 25,000K records, howto??
by mscharrer
in thread Question: Generate unique/random 12-digit keys for 25,000K records, howto??
by lihao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |