hugsbrugs / php-security
PHP Security Utilities
Installs: 35
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Language:HTML
This package is auto-updated.
Last update: 2024-10-20 01:55:59 UTC
README
This library allows
Install
Install package with composer
composer require hugsbrugs/php-security
In your PHP code, load library
require_once __DIR__ . '/../vendor/autoload.php'; use Hug\Security\Security as Security;
Get Paylod for JWT authentication
Security::get_payload($url, $uid, $role, $demo = false);
Clean HTML input from scripts, style, meta, tags
Security::clean_input($input);
Clean input received by HTML forms to prevent injection
Security::sanitize($input);
Generates random password
Security::password($length = 15, $simple = false);
Unit Tests
phpunit --bootstrap vendor/autoload.php tests
Author
Hugo Maugey visit my website ;)