Download the PHP package leoboy/desensitization without Composer

On this page you can find all versions of the php package leoboy/desensitization. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package desensitization

Leoboy Desensitization - A Powerful PHP Data Desensitization Tool

A powerful PHP data desensitization tool with built-in rich desensitization calculation rules: masking, encryption, truncation, replacement, and more. It also supports dynamic authorization desensitization based on security policies.

Features

Environment

Quick Start

Installation

Usage

Laravel Integration

For the Laravel framework, it supports automatic package discovery and loading, eliminating the need for manual installation.

If you want to make changes in the configuration you can publish the config file desensitization.php using:

content of the configuation file:

The desensitizer object is automatically bound in the Laravel container (unless accessed through the global method, which returns a local desensitizer object). You can quickly access the desensitizer object through the provided Facade:

Executing Desensitization Based on Dynamic Hierarchical Policies

In practical application scenarios, it is often necessary to perform different desensitization processes for different levels of users, such as: administrators can view all data, while regular users can only see partial data. To address this issue, this library provides three interface definitions: "GuardContract", "SecurityPolicyContract", and "RuleContract".

RuleContract

Custom rule classes need to implement the interface: \Leoboy\Desensitization\Contracts\RuleContract. The rule class defines how to transform the input value into an output.

Currently, the package includes the following built-in rules:

Rules can also use by short name:

it has the same effect as:

currently, avaiable short names:

if you want to add a new customized rule and its short name, you can use:

if you want to overide a built-in rule, you can use (it may cause some unpredictable problems):

GuardContract

The guard is used to obtain the security policy. In common scenarios, the guard can be a user model or a custom class, but both need to implement the interface: \Leoboy\Desensitization\Contracts\GuardContract

For example:

Built-in guards include:

SecurityPolicyContract

The security policy class needs to implement the interface Leoboy\Desensitization\Contracts\SecurityPolicyContract. The security policy determines how to desensitize the user's input attribute fields based on the user's input attribute object. Different rules or closures can be defined for different attributes.

Built-in security policies include:

License

Desenseitization is open-sourced software licensed under the MIT license.

Contact with me

if you have any questions, you can issue a question.

With this powerful tool, you can flexibly define and apply desensitization rules based on your specific needs and security policies.

:heart: ENJOY IT!


All versions of desensitization with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
illuminate/hashing Version ^8.0|^9.0|^10.0|^11.0
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package leoboy/desensitization contains the following files

Loading the files please wait ....