dignityinside/security

Security helper class


Keywords
php, security
License
MIT

Documentation

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Make your changes
  4. Commit your changes (git commit -am 'Added some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request