PHPackages                             ductran/sensitive-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. ductran/sensitive-filter

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

ductran/sensitive-filter
========================

Detect &amp; Hide sensitive data in string

v0.1.1-beta(8y ago)06MITPHPPHP &gt;=5.5

Since Nov 1Pushed 8y ago2 watchersCompare

[ Source](https://github.com/minhduc1/SensitiveFilter)[ Packagist](https://packagist.org/packages/ductran/sensitive-filter)[ RSS](/packages/ductran-sensitive-filter/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Sensitive Filter
================

[](#sensitive-filter)

Hide sensitive information in string

[![Packagist](https://camo.githubusercontent.com/28e738e928094ef65c55dfa880a154f7887cd69765a4c925ac7be3f067fd8af2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6475637472616e2f73656e7369746976652d66696c7465722e737667)](https://packagist.org/packages/ductran/sensitive-filter)[![Packagist](https://camo.githubusercontent.com/c7d73ade6bb3fa667cb1b136b527cd396bb03af66e60cdb91c06001a216af549/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6475637472616e2f73656e7369746976652d66696c7465722e737667)](https://packagist.org/packages/ductran/sensitive-filter)[![Travis](https://camo.githubusercontent.com/d681105bfae02828f5822c524b0fc2792be264613a62ce70c939b23ac536db3b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f41646f6c665472616e2f53656e73697469766546696c7465722e737667)](https://travis-ci.org/minhduc1/SensitiveFilter)[![Codecov](https://camo.githubusercontent.com/fa29ad591d7345f954920760194f5df6f29ce1039f1d1ef381feb26970bc633e/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f41646f6c665472616e2f53656e73697469766546696c7465722e737667)](https://codecov.io/gh/minhduc1/SensitiveFilter)[![Packagist](https://camo.githubusercontent.com/4a0b9c6fcb970e5a19eee521a055192b7d3f9e7add72bc970c93e1fec65ca177/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6475637472616e2f73656e7369746976652d66696c7465722e737667)](https://packagist.org/packages/ductran/sensitive-filter)

Installation
------------

[](#installation)

`$ composer require ductran/sensitive-filter`

Usage
-----

[](#usage)

```
use \Ductran\SensitiveFilter\Facades\SensitiveFilter;
```

#### Hide Email

[](#hide-email)

```
  $filter = new \Ductran\SensitiveFilter\SensitiveFilter();
  $filter->addProcessor(new \Ductran\SensitiveFilter\EmailProcessor());
  echo $filter->filter('duc@gmail.com adasd test@gmail.com');
```

#### Hide Id Card

[](#hide-id-card)

```
  $filter = new \Ductran\SensitiveFilter\SensitiveFilter();
  $filter->addProcessor(new \Ductran\SensitiveFilter\IdCardProcessor());
  echo $filter->filter('dadads2478-8339-3242-2423dsdsa2478-8339-3242-2424');
```

#### Hide string matching regex string

[](#hide-string-matching-regex-string)

```
  SensitiveFilter::on()->withRegex('/[0-9]{10}/')->withRegex('/([a-z0-9_-]{6,9})/')->filter('$$$^^^&[myp4ssw0rd] 0979306603');
```

Contributing
------------

[](#contributing)

1. Fork it!
2. Create your feature branch: `$ git checkout -b feature/your-new-feature`
3. Commit your changes: `$ git commit -am 'Add some feature'`
4. Push to the branch: `$ git push origin feature/your-new-feature`
5. Submit a pull request.

License
-------

[](#license)

MIT License

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3157d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab6e828307c0970d4511a6c0481eb52b257ae9525f3fea96c9786457af2c56e8?d=identicon)[minhduc1](/maintainers/minhduc1)

---

Top Contributors

[![AdolfTran](https://avatars.githubusercontent.com/u/13670052?v=4)](https://github.com/AdolfTran "AdolfTran (15 commits)")[![khuyentn](https://avatars.githubusercontent.com/u/6139366?v=4)](https://github.com/khuyentn "khuyentn (5 commits)")[![jaredchu](https://avatars.githubusercontent.com/u/4394552?v=4)](https://github.com/jaredchu "jaredchu (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ductran-sensitive-filter/health.svg)

```
[![Health](https://phpackages.com/badges/ductran-sensitive-filter/health.svg)](https://phpackages.com/packages/ductran-sensitive-filter)
```

###  Alternatives

[chaoswey/taiwan-id-validator

台灣身分證、統一編號驗證

319.9k](/packages/chaoswey-taiwan-id-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
