4

SecureRandom の特定の開始が「良い」かどうかを尋ねる質問がたくさんありますが、経験則を見つけることができませんでした。

「良い」ランダムな SecureRandom を作成する最良の方法は何ですか?

// Fast
// Is it a good random?
SecureRandom secureRandom = new SecureRandom()?

// Freezes for a few seconds after being used several times - until getting a random enough seed.
// See http://stackoverflow.com/questions/137212/how-to-solve-performance-problem-with-java-securerandom#comment68934647_137212
// Is it a good random?
SecureRandom secureRandom = new SecureRandom(SecureRandom.getSeed(20))?

// Freezes for a very long time. Waited minutes and still no return :(
SecureRandom secureRandom = new SecureRandom.getInstanceStrong()?

Other?
4

2 に答える 2