Home  >  Q&A  >  body text

java - URL的ID加密,用什么算法好点呢?

PHP中文网PHP中文网2741 days ago615

reply all(4)I'll reply

  • 黄舟

    黄舟2017-04-18 10:15:30

    You can use uuid as the primary key or if you have to use auto-increment, add a field as a unique index

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:15:30

    If you are simply afraid of being seen because of the amount of data, just make a big number and start increasing it. . .

    reply
    0
  • 黄舟

    黄舟2017-04-18 10:15:30

    And each increment is bigger

    reply
    0
  • 怪我咯

    怪我咯2017-04-18 10:15:30

    The most trouble-free solution is: uuid, other methods are to generate strategies through custom primary keys and set the self-increase step size

    reply
    0
  • Cancelreply