PHP short unique ID generation using auto_increment?

后端 未结 8 1483
自闭症患者
自闭症患者 2021-02-04 17:14

I would like to generate a short, unique ID without having to check for collisions.

I currently do something like this, but the ID I currently generate is random and che

8条回答
  •  一向
    一向 (楼主)
    2021-02-04 18:11

    I think this will never be really secure, as you only need to find the encryption method behind the short unique string to hijack an ID. Is checking for collisions in a loop really that problematic in your setting?

提交回复
热议问题