Manual:CryptRand.php

The MWCryptRand class is a cryptographic random generator class used for generating secret keys.

This is based in part on Drupal code as well as what we used in our own code prior to introduction of this class.