SafeRandom class.