CSecurityManager:

1. Added /dev/urandom usage.
2. A couple of minor code optimizations.