PHPackages                             phpsec/phpsec - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. phpsec/phpsec

AbandonedArchivedLibrary[Security](/categories/security)

phpsec/phpsec
=============

A PHP security library

0.6.5(11y ago)216104.0k↓39.5%36[12 issues](https://github.com/phpsec/phpSec/issues)[3 PRs](https://github.com/phpsec/phpSec/pulls)3MITPHPPHP &gt;=5.3.7

Since Aug 18Pushed 6y ago29 watchersCompare

[ Source](https://github.com/phpsec/phpSec)[ Packagist](https://packagist.org/packages/phpsec/phpsec)[ Docs](https://phpseclib.com/)[ RSS](/packages/phpsec-phpsec/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (12)Used By (3)

**phpSec is no longer actively maintained**

This project is [now live on Subspace](https://app.dev.subspace.net/gitlab/subspace-open-development/phpsec)! Subspace is the open-development platform where projects are maintained collectively through voting.

[phpSec](https://phpseclib.com/) - PHP security library
=======================================================

[](#phpsec---php-security-library)

- phpSec is a open-source [PHP](http://php.net) security library that takes care of the common security tasks a web developer faces.

[![Build Status](https://camo.githubusercontent.com/0724f2aeac56600c4f9ca77958cf63ff6005f9fbf3511b5ddbcb8cceff95f8b7/68747470733a2f2f7472617669732d63692e6f72672f7068707365632f7068705365632e706e67)](https://travis-ci.org/phpsec/phpSec)[![Latest Stable Version](https://camo.githubusercontent.com/e7c78eaad8731dd612f5166080f02eb1f31fc34fab348d929c1572d4d49b89dc/68747470733a2f2f706f7365722e707567782e6f72672f7068707365632f7068707365632f762f737461626c652e706e67)](https://packagist.org/packages/phpsec/phpsec)[![Total Downloads](https://camo.githubusercontent.com/1bcddc1b000d5728ee81784cd1188914d33eb7801d432738dee2e33f21411eea/68747470733a2f2f706f7365722e707567782e6f72672f7068707365632f7068707365632f646f776e6c6f6164732e706e67)](https://packagist.org/packages/phpsec/phpsec)[![Latest Unstable Version](https://camo.githubusercontent.com/f651a9aae65b00682de8b14fdb77baf57370143b349837457a9b05a5a750482c/68747470733a2f2f706f7365722e707567782e6f72672f7068707365632f7068707365632f762f756e737461626c652e706e67)](https://packagist.org/packages/phpsec/phpsec)[![License](https://camo.githubusercontent.com/c6e0a84c4e3bfd9d378ae27fcfcab486bdb7f1610d197d6c164185fd99c23fa9/68747470733a2f2f706f7365722e707567782e6f72672f7068707365632f7068707365632f6c6963656e73652e706e67)](https://packagist.org/packages/phpsec/phpsec)

Features
--------

[](#features)

- Data encryption
- XSS filter
- Password hashing
- Secure session handler
- CSRF protection
- Yubikey integration
- Authy integration
- Random data generator

Installing
----------

[](#installing)

phpSec is now a PSR-0 compatible library. this means that it can easilly be installed and loaded using [Composer](http://getcomposer.org/doc/00-intro.md). You can also install phpSec manually, or using Git.

### Installing using [Composer](http://getcomposer.org/doc/00-intro.md)

[](#installing-using-composer)

To install using Composer just add phpSec to your composer.json file in your project directory.

```
{
    "require": {
        "phpsec/phpsec":"0.6.*"
    }
}

```

Then all you need to do is to run `$ php composer.phar install` . phpSec can then be loaded using the Composer autoloader.

`require 'vendor/autoload.php';`

### Installing manually/Git

[](#installing-manuallygit)

Download, checkout or peferrably add phpSec as a Git submodule. To add an autoloader to your project there is [one example here](http://gist.github.com/221634). This can be initialized like this:

```
