http://stackoverflow.com/questions/295628/securerandom-init-once-or-every-time-it-is-needed
Unlike the java.util.Random class, the java.security.SecureRandom class must produce non-deterministic output on each call. What that means is, in case of java.util.Random, if you were to recreate an instance with the same seed each time you needed a new random number, you would essentially get the same result every time. However, SecureRandom is guaranteed to NOT do that - so, creating a single instance or creating a new one each time does not affect the randomness of the random bytes it generates
Additionally, SecureRandom must produce non-deterministic output and therefore it is required that the seed material be unpredictable and that output of SecureRandom be cryptographically strong sequences as described in RFC 1750: Randomness Recommendations for Security.
'java core' 카테고리의 다른 글
G1 알고리즘 공부 (0) | 2010.08.09 |
---|---|
JDK 1.6.0 update 21 때문에 Eclipse 문제 발생 (0) | 2010.08.09 |
Some Java Concurrency Tips (0) | 2010.06.11 |
Diagnosing Web Application OutOfMemoryErrors (0) | 2010.06.10 |
Understanding J2EE Class Loading (0) | 2010.06.03 |