A random number generator is a software or hardware solution which functions as a generator of (real or pseudo) random numbers (or bits).

In the realms of cryptography, a CSRNG (Cryptographically Secure Random Number Generator) or CSPRNG (Cryptographically Secure Pseudo Random Number Generator) is used. This can either be a software solution, or a dedicated hardware device.