Obfuscating an ID

前端 未结 11 527
逝去的感伤
逝去的感伤 2020-11-28 02:20

I\'m looking for a way to encrypt/obfuscate an integer ID into another integer. More precisely, I need a function int F(int x), so that

  • x<->F(x
11条回答
  •  独厮守ぢ
    2020-11-28 02:50

    I found this particular piece of Python/PHP code very useful:

    https://github.com/marekweb/opaque-id

提交回复
热议问题