PHPackages                             maximantonisin/veles-hide-string - 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. maximantonisin/veles-hide-string

ActiveLibrary

maximantonisin/veles-hide-string
================================

String security/anonymous hide

v1.3.0(3y ago)0554[1 PRs](https://github.com/antonisin/veles-hide-string/pulls)MITPHPPHP ^7.2|^8.0

Since Jun 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/antonisin/veles-hide-string)[ Packagist](https://packagist.org/packages/maximantonisin/veles-hide-string)[ RSS](/packages/maximantonisin-veles-hide-string/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (6)Dependencies (2)Versions (15)Used By (0)

Veles Hide (String security hide)
=================================

[](#veles-hide-string-security-hide)

[![img](https://camo.githubusercontent.com/3ffe1efc1e77909f0e13b02b4ce3ce4495f7623fd146dcd7f8891b07b0266501/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6178696d616e746f6e6973696e2f76656c65732d686964652d737472696e673f7374796c653d666f722d7468652d6261646765)](https://github.com/antonisin/veles-hide-string/blob/master/License)[![img](https://camo.githubusercontent.com/5d3877b918a3be07eeb34a52ea36ecc228e9acd291c6720d4c18be6ef4516180/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6178696d616e746f6e6973696e2f76656c65732d686964652d737472696e673f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/maximantonisin/veles-hide-string)[![img](https://camo.githubusercontent.com/b4f332e1d5bd542bca1a78b02c065a7e879e5e8c84944506653852a5abab3a8e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f616e746f6e6973696e2f76656c65732d686964652d737472696e672f504850556e69743f7374796c653d666f722d7468652d6261646765)](https://github.com/antonisin/veles-hide-string/actions)

Author
------

[](#author)

Maxim Antonisin

[Linkedin](https://www.linkedin.com/in/mantonishin/)

Description
-----------

[](#description)

This package is designed and implemented to work with text/strings to replace/hide sensitive information.

Requirements
------------

[](#requirements)

[![img](https://camo.githubusercontent.com/eb5e4e1e50e52ddf41352aabad908d95145a63629c43ab29de5b94ba9096193c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6d6178696d616e746f6e6973696e2f76656c65732d686964652d737472696e672f73796d666f6e792f747769672d6272696467653f7374796c653d666f722d7468652d6261646765)](https://github.com/symfony/twig-bridge/releases/tag/v3.3.4)[![img](https://camo.githubusercontent.com/16189fd32bcae5ca46f4b0ae7f31ce64340b737de56568f163af79486a4c00f3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6d6178696d616e746f6e6973696e2f76656c65732d686964652d737472696e672f7068703f7374796c653d666f722d7468652d6261646765)](https://www.php.net/releases/7_2_0.php)[![img](https://camo.githubusercontent.com/087b107763651178370bb032b8b0ee363eeac2769061ae4cf0c85872a2596477/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d72657175697265642d6f72616e67653f7374796c653d666f722d7468652d6261646765)](https://getcomposer.org/download/)

- PHP 7.2+
- composer
- symfony/twig-bridge

Options
-------

[](#options)

- `length` - Number of chars to be replaced.
- `offset` - Number of chars to skip before replace.
- `hideChar` - Special symbol used for replace.

Use
---

[](#use)

### String (MaximAntonisin\\Veles\\Type\\StringTypeInterface::class)

[](#string-maximantonisinvelestypestringtypeinterfaceclass)

#### Options

[](#options-1)

No additional options for this string type format. This type is default.

#### Replace chars

[](#replace-chars)

```
use MaximAntonisin\Veles\VelesHide;
use MaximAntonisin\Veles\Type\StringTypeInterface;

$result = VelesHide::hide('exampleDomainName@example.com', [
    StringTypeStringTypeInterface::OPTION_LENGTH  => 4,
    StringTypeInterface::OPTION_OFFSET  => 2,
]);
var_dump($result);

//string(29) "ex****eDomainName@example.com"
```

### Email (MaximAntonisin\\Veles\\Type\\EmailTypeInterface::class)

[](#email-maximantonisinvelestypeemailtypeinterfaceclass)

#### Options

[](#options-2)

- `domainLength` - Number of chars to be replaced in domain part.
- `domainOffset` - Number of chars to be skipped to replace in domain part.

#### Basic usage

[](#basic-usage)

```
use MaximAntonisin\Veles\VelesHide;
use MaximAntonisin\Veles\Type\EmailTypeInterface;

$result = VelesHide::hide('exampleDomainName@example.com', [
    EmailTypeInterface::OPTION_LENGTH  => 4,
    EmailTypeInterface::OPTION_OFFSET  => 2,
], 'email');
var_dump($result);

//string(29) "ex****eDomainName@example.com"
```

#### Replace in email name and domain parts

[](#replace-in-email-name-and-domain-parts)

```
use MaximAntonisin\Veles\VelesHide;
use MaximAntonisin\Veles\Type\EmailTypeInterface;

$result = VelesHide::hide('exampleDomainName@example.com', [
    EmailTypeEmailTypeInterface::OPTION_DOMAIN_LENGTH => 4,
    EmailTypeInterface::OPTION_DOMAIN_OFFSET => 2,
], 'email');

var_dump($result);

//string(29) "e****leDomainName@ex****e.com"
```

#### Replace only in email domain part

[](#replace-only-in-email-domain-part)

```
use MaximAntonisin\Veles\VelesHide;
use MaximAntonisin\Veles\Type\EmailTypeInterface;

$result = VelesHide::hide('exampleDomainName@example.com', [
    EmailTypeInterface::OPTION_LENGTH        => 0,
    EmailTypeInterface::OPTION_DOMAIN_LENGTH => 4,
    EmailTypeInterface::OPTION_DOMAIN_OFFSET => 2,
], 'email');
var_dump($result);

//string(29) "exampleDomainName@ex****e.com"
```

### Url (MaximAntonisin\\Veles\\Type\\UrlTypeInterface::class)

[](#url-maximantonisinvelestypeurltypeinterfaceclass)

#### Options

[](#options-3)

- `schemeLength` - Number of chars to be replaced in scheme part.
- `schemeOffset` - Number of chars to be skipped on replace in scheme part.
- `queryLength` - Number of chars to be replaced in query part.
- `queryOffset` - Number of chars to be skipped on replace in query part.
- `pathLength` - Number of chars to be replaced in path part.
- `pathOffset` - Number of chars to be skipped on replace in path part.

#### Basic Usage

[](#basic-usage-1)

```
use MaximAntonisin\Veles\VelesHide;
use MaximAntonisin\Veles\Type\UrlTypeInterface;

$result = VelesHide::hide('https://foo.example.com/path/to/something?queryParam=queryValue', [
    UrlTypeInterface::OPTION_LENGTH  => 4,
    UrlTypeInterface::OPTION_OFFSET  => 2,
], 'url');
var_dump($result);

//string(23) "https://fo****ample.com"
```

#### Replace in scheme

[](#replace-in-scheme)

```
use MaximAntonisin\Veles\VelesHide;
use MaximAntonisin\Veles\Type\UrlTypeInterface;

$result = VelesHide::hide('https://foo.example.com/path/to/something?queryParam=queryValue', [
    UrlTypeInterface::OPTION_LENGTH         => 0,
    UrlTypeInterface::OPTION_SCHEME_LENGTH  => 2,
    UrlTypeInterface::OPTION_SCHEME_OFFSET  => 2,
], 'url');
var_dump($result);

//string(23) "ht**s://foo.example.com"
```

#### Replace in path

[](#replace-in-path)

```
use MaximAntonisin\Veles\VelesHide;
use MaximAntonisin\Veles\Type\UrlTypeInterface;

$result = VelesHide::hide('https://foo.example.com/path/to/something?queryParam=queryValue', [
    UrlTypeInterface::OPTION_LENGTH       => 0,
    UrlTypeInterface::OPTION_PATH_LENGTH  => 6,
    UrlTypeInterface::OPTION_PATH_OFFSET  => 2,
], 'url');
var_dump($result);

//string(41) "https://foo.example.com/p******/something"
```

#### Replace in query

[](#replace-in-query)

```
use MaximAntonisin\Veles\VelesHide;
use MaximAntonisin\Veles\Type\UrlTypeInterface;

$result = VelesHide::hide('https://foo.example.com/path/to/something?queryParam=queryValue', [
    UrlTypeInterface::OPTION_LENGTH        => 0,
    UrlTypeInterface::OPTION_PATH_LENGTH   => 0,
    UrlTypeInterface::OPTION_QUERY_LENGTH  => 4,
    UrlTypeInterface::OPTION_QUERY_OFFSET  => 2,
], 'url');
var_dump($result);

//string(63) "https://foo.example.com/path/to/something?qu****aram=queryValue"
```

Support
-------

[](#support)

[ ![sleepwalker](https://camo.githubusercontent.com/0cf29a542375e1a46e84d8bf5805a4e5c0a6ee98b6547ccdc0c55eed49d99c69/68747470733a2f2f63646e2e6275796d6561636f666665652e636f6d2f627574746f6e732f76322f64656661756c742d79656c6c6f772e706e67)](https://www.buymeacoffee.com/maximusCode)[![Buy Me a Coffee at ko-fi.com](https://camo.githubusercontent.com/c5a89b6f3d0c8bb7c414302c91c7a23cafc6decb2c0e6a7da6d0e151e6c3e4ea/68747470733a2f2f63646e2e6b6f2d66692e636f6d2f63646e2f6b6f6669342e706e673f763d33)](https://ko-fi.com/maximusCode)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~139 days

Recently: every ~208 days

Total

7

Last Release

1313d ago

PHP version history (2 changes)v1.0-betaPHP ^7.2.5

v1.3.0.x-devPHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1049b00c3e6a3332b17a39904753227adf2501753ea7c916f4fca7899b76e422?d=identicon)[antonisin](/maintainers/antonisin)

---

Top Contributors

[![antonisin](https://avatars.githubusercontent.com/u/9513679?v=4)](https://github.com/antonisin "antonisin (14 commits)")

---

Tags

hidehide charasterisk hideasterisk replacereplace charasterisk charsecurity asterisksecurity string replace

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maximantonisin-veles-hide-string/health.svg)

```
[![Health](https://phpackages.com/badges/maximantonisin-veles-hide-string/health.svg)](https://phpackages.com/packages/maximantonisin-veles-hide-string)
```

###  Alternatives

[symfony/debug-bundle

Provides a tight integration of the Symfony VarDumper component and the ServerLogCommand from MonologBridge into the Symfony full-stack framework

2.4k115.8M824](/packages/symfony-debug-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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