Changes
Title
unchanged
Using phpseclib with Yii
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
security
Content
changed
I installed phpseclib because I needed to do some AES encryption in my project. After all the hassle of installing php lib, I found out that Yii already has a security module ([securityManager](http://www.yiiframework.com/doc/api/1.1/CApplication#securityManager "securityManager")). I finally decided to keep using phpseclib because it has one big advantage over Yii securityManager module, it does not requite mcrypt to be installed in the phpserver!
Installing phpseclib is not as straightforward as you could imagine. Yii lazy loading (I think it is called like that) is not compatible with phpseclib files because classes are not called the same as the file names they are in.
**
-Steps to install phpseclibEdit:** As yiqing95 pointed out, the reason the names are not the same is because of a zend and pear naming convention so the zend autoloader should be used instead of my approach of modifying the third party library. Proceed at your own risk, but you better read yiqing95 comment.
**-Steps to install phpseclib (modifying the library, not recommended now)-**
(written on 2/Oct/2012, using Yii version 1.1.12. and phpseclib 0.3.0)[...]
}
```
(see phplib documentation for more details)