public function encrypt($value, $iv = null)
    {
        if(empty($value))
            return false;
        
        include_once PATH_SYSTEM . '/vendors/phpseclib0/Crypt/Rijndael.php';
        include_once PATH_SYSTEM . '/vendors/phpseclib0/Crypt/AES.php';

        $this->Crypt = new Crypt_AES();
        $this->Crypt->setKey($this->key);
        if (!is_null($iv))
            $this->Crypt->setIV($iv);
        return $this->Crypt->encrypt($value);
    }
public function encrypt($value, $iv = null)
    {
        if(empty($value))
            return false;
        
        include_once PATH_SYSTEM . '/vendors/phpseclib0/Crypt/Rijndael.php';
        include_once PATH_SYSTEM . '/vendors/phpseclib0/Crypt/AES.php';

        $this->Crypt = new Crypt_AES();
        $this->Crypt->setKey($this->key);
        if (!is_null($iv))
            $this->Crypt->setIV($iv);
        return $this->Crypt->encrypt($value);
    }
public function encrypt ( $ value , $ iv = null ) { if ( empty ( $ value ) ) return false ; include_once PATH_SYSTEM . '/vendors/phpseclib0/Crypt/Rijndael.php' ; include_once PATH_SYSTEM . '/vendors/phpseclib0/Crypt/AES.php' ; $ this -> Crypt = new Crypt_AES ( ) ; $ this -> Crypt -> setKey ( $ this -> key ) ; if ( ! is_null ( $ iv ) ) $ this -> Crypt -> setIV ( $ iv ) ; return $ this -> Crypt -> encrypt ( $ value ) ; }
Encrypts the given value using the included phpseclib AES implementation

@param string $value The value to encrypt
@param string $iv    (optional) the initialization vector

@return string the encrypted version of $value
Encrypts the given value using the included phpseclib AES implementation