Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 Google Plus 生成用户唯一 ID 的技术是什么?
https://plus.google.com/ 102766325060234825733 /posts
您只能假设它们是随机生成的 ID,它们足够大,可以以足够的熵非顺序生成。
ID 太大而无法存储在有趣的 bigint 字段中,这也可能是由于所需的熵和非顺序要求(因此无法通过比较用户 ID 来推断任何内容)。
可以使用带有密钥的串行生成数字的简单加密来生成 ID。它可以是单向哈希,也可以是可解密的加密。不直接使用序列号的原因很明显:你很容易猜测网络上其他用户的用户ID,这可能导致Bots抓取网络内容。