PUGX / shortid-php

An implementation of ShortId in PHP
MIT License
51 stars 7 forks source link

It is just random? not unique? #7

Closed charleslxh closed 7 years ago

garak commented 7 years ago

I'm not sure about your question... anyway, the uniqueness is not guaranteed, like any other random system. It's just a matter or probability

charleslxh commented 7 years ago

I tested getMediumStrengthGenerator of ircmaxell/random-lib lib, and I used 5 processes to generate random string (length => 8), every process generate 100,000 strings, I didn't find any same string in all random strings(500,000).

garak commented 7 years ago

Is this enough random for you?

charleslxh commented 7 years ago

it's enough in my project, thx!

garak commented 7 years ago

You're welcome