Dignity Security
An easy to use security helpers.
Installation
composer require dignityinside/security
composer install
Usage example
Security:
use Dignity\Security\Security;
// Check referer for xss-attacks, if post request
Security::checkReferer();
// Encode password with secret key
Security::encodePassword('admin', 'hacker123');
// Generate random key
Security::generateRandomKey();
// Generate security headers for protection again XSS
Security::generateSecurityHeaders();
Filter:
use Dignity\Security\Filter;
Filter::text('Hallo_World');
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
- Fork it
- Create your feature branch (git checkout -b my-new-feature)
- Make your changes
- Commit your changes (git commit -am 'Added some feature')
- Push to the branch (git push origin my-new-feature)
- Create new Pull Request