No Secure Random Number Generators Available in JDK
I am cu开发者_StackOverflow中文版rrently running JDK 6 on Windows 7 and have installed the Unlimited Strength Policy Files. I wrote a Java app some time ago which used to work but now fails, giving an error message indicating that the SHA1PRNG SecureRandom is not available. I have tried printing a list of cryptographic providers available on the platform and it would appear that there are no secure random number generators available - does anyone have any idea why this might be?
Many thanks in advance for your help!
According to this the SHA1PRNG is available out of the box with JDK6. You don't need need to install any additional policy files.
Most likely you are getting a NoSuchAllgorithmException thrown because your installation no longer proves Pseudo Random Number Generator "SHA1PRNG", I would recomend having a look here for info on how Algorithm are provided and used.
精彩评论