in reply to Re^2: Question: Generate unique/random 12-digit keys for 25,000K records, howto??
in thread Question: Generate unique/random 12-digit keys for 25,000K records, howto??

Are 12 hex-digits enough for 50 Million unique strings?
Let's ask perl:

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?