hugsbrugs/php-security

There is no license information available for the latest version (0.1) of this package.

PHP Security Utilities

0.1 2017-03-10 14:09 UTC

This package is auto-updated.

Last update: 2024-10-20 01:55:59 UTC


README

This library allows

Build Status Coverage Status

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 ;)