开发者

How to generate a Doodle like poll id on app engine?

I would like to generate an id for a poll that can be use开发者_C百科d in links. The id should not be not to easy to guess. Is there a preferred way to generate such an id on google app engine?


UUID - http://en.wikipedia.org/wiki/UUID

String key = UUID.createNewUUID().toString();

As close to unique as makes no odds, and impossible to 'guess'.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜