Beware some changes in Yii 1.1.14 if you want to upgrade your system.
http://static.yiiframework.com/files/CHANGELOG-1.1.14.txt
So far what I used and liked is new function generateRandomBytes and generateRandomString in framework/base/CSecurityManager.php.
CSecurityManager::generateRandomBytes(): generates random binary data. Cryptographical strong characteristic is changeable via second argument. Note, cryptographically strong random generation process is relatively slow.
CSecurityManager::generateRandomString(): generates random string. Cryptographical strong characteristic is changeable via second argument. Note, cryptographically strong random generation process is relatively slow.
These functions are easy to use, and better than rand() or mt_rand(), the PHP build-in functions. mt_rand() is not really random.