The RandomGenerator class The security.RandomGenerator class includes methods for creating random strings or numbers. security.RandomGenerator methods Methods of the security.RandomGenerator class.