Are Java random UUID's predictable?

后端 未结 3 2154
野性不改
野性不改 2020-12-09 07:27

I would like to use a cryptographically secure primary key for sensitive data in a database - this cannot be guessable/predictable and it cannot be generated by the database

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-09 07:57

    If you want to generate a secure random key, I suggest you use SecureRandom. This can generate a key of any number of bits you require. Its slower than Random, but much more secure.

提交回复
热议问题