public static void installSecureRandomProvider ( ) { CoGProperties props = CoGProperties . getDefault ( ) ; String providerName = props . getSecureRandomProvider ( ) ; try { Class providerClass = Class . forName ( providerName ) ; Security . insertProviderAt ( ( Provider ) providerClass . newInstance ( ) , 1 ) ; } catch ( Exception e ) { logger . debug ( "Unable to install PRNG. Using default PRNG." , e ) ; } }
Installs SecureRandom provider . This function is automatically called when this class is loaded .