有很多问题询问 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?