This library allows
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);
phpunit --bootstrap vendor/autoload.php tests
Hugo Maugey visit my website ;)