PHPackages                             jetlee0797/humanid - 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. jetlee0797/humanid

ActiveLibrary

jetlee0797/humanid
==================

Encrypt numeric data (binary, decimal, hex) preserving it's format (eg. 16-digits card number to 16-digits encrypted number).

00PHP

Since Jun 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jetlee0797/humanid)[ Packagist](https://packagist.org/packages/jetlee0797/humanid)[ RSS](/packages/jetlee0797-humanid/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Cryptomute
==========

[](#cryptomute)

A small PHP class implementing Format Preserving Encryption via Feistel Network.

1. Installation
---------------

[](#1-installation)

You can install Cryptomute via [Composer](http://getcomposer.org) (packagist has [loostro/cryptomute](https://packagist.org/packages/loostro/cryptomute) package). In your `composer.json` file use:

```
{
    "require": {
        "loostro/cryptomute": "^1.0"
    }
}
```

And run: `php composer.phar install`. After that you can require the autoloader and use Cryptomute:

2. Usage
--------

[](#2-usage)

```
require_once 'vendor/autoload.php';

use Cryptomute\Cryptomute;

$cryptomute = new Cryptomute(
    'aes-128-cbc',      // cipher
    '0123456789zxcvbn', // base key
    7,                  // number of rounds
);

$password = '0123456789qwerty';
$iv = '0123456789abcdef';

$plainValue = '2048';
$encoded = $cryptomute->encrypt($plainValue, 10, false, $password, $iv);
$decoded = $cryptomute->decrypt($encoded, 10, false, $password, $iv);

var_dump([
  'plainValue' => $plainValue,
  'encoded'    => $encoded,
  'decoded'    => $decoded,
]);
```

```
array(3) {
  ["plainValue"]=>
  string(4) "2048"
  ["encoded"]=>
  string(9) "309034283"
  ["decoded"]=>
  string(4) "2048"
}

```

3. Options
----------

[](#3-options)

### 3.1 Cipher

[](#31-cipher)

Cipher is the first constructor argument. Supported cipher methods are:

CipherIV`des-cbc`yes`aes-128-cbc`yes`aes-128-ecb`no`aes-192-cbc`yes`aes-192-ecb`no`camellia-128-cbc`yes`camellia-128-ecb`no`camellia-192-cbc`yes`camellia-192-ecb`no### 3.2 Key

[](#32-key)

Key is the second constructor argument. Base key from which all round keys are derrived.

### 3.3 Rounds

[](#33-rounds)

Rounds is the third constructor argument. Must be an odd integer greater or equal to 3. More rounds is more secure, but also slower. Recommended value is at least 7.

4. Public methods
-----------------

[](#4-public-methods)

### 4.1 setValueRange(`$minValue`, `$maxValue`)

[](#41-setvaluerangeminvalue-maxvalue)

Sets minimum and maximum values. If the result is out of range it will be re-encrypted (or re-decrypted) until ouput is in range.

### 4.2 encrypt(`$plainValue`, `$base`, `$pad`, `$password`, `$iv`)

[](#42-encryptplainvalue-base-pad-password-iv)

Encrypts data. Takes following arguments:

- `$plainValue` (string) input data to be encrypted
- `$base` (int) input data base, accepted values is 2 (binary), 10 (decimal) or 16 (hexadecimal)
- `$pad` (bool) pad left output to match `$maxValue`'s length?
- `$password` (string) encryption password
- `$iv` (string) initialization vector - only if cipher requires it

### 4.2 decrypt(`$cryptValue`, `$base`, `$pad`, `$password`, `$iv`)

[](#42-decryptcryptvalue-base-pad-password-iv)

Decrypts data. Takes following arguments:

- `$cryptValue` (string) input data to be decrypted
- `$base` (int) input data base, accepted values is 2 (binary), 10 (decimal) or 16 (hexadecimal)
- `$pad` (bool) pad left output to match `$maxValue`'s length?
- `$password` (string) encryption password
- `$iv` (string) initialization vector - only if cipher requires it

License
-------

[](#license)

Cryptomute is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![loostro](https://avatars.githubusercontent.com/u/39191878?v=4)](https://github.com/loostro "loostro (13 commits)")

### Embed Badge

![Health badge](/badges/jetlee0797-humanid/health.svg)

```
[![Health](https://phpackages.com/badges/jetlee0797-humanid/health.svg)](https://phpackages.com/packages/jetlee0797-humanid)
```

PHPackages © 2026

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