I'm working on a small web service that will require users to upload files. The file type is P12. When the file is uploaded and I need to save it on my server, I need to generate a random name for it. I can have the server generate a long random string of letters and numbers called a UUID. Here's a UUID I generated:
5025e8c423cad (so the file would be named 5025e8c423cad.p12)
I read online that a UUID would have to be generated 1 billion times per second for the next 100 years in order to have a 50% chance of being generated again. I'm assuming that Facebook uses something similar, if not UUIDs, to name photos when people upload them. If it stayed around for a very long time, Facebook could meet the maximum (and photos would be overwritten if they did not do something).
This might be a stupid question, but if I changed the name from uuid.p12 to uuid-uuid.p12, what would be the probability of generating the same one after one hundred years? I was quick to think 25%, but after spending a minute thinking about it, I would assume the percentage would be much, much lower.