PHPackages                             hmac/hmac - 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. hmac/hmac

ActiveLibrary

hmac/hmac
=========

request encryption and signature

1.0.1(7y ago)023MITPHP

Since Oct 24Pushed 7y agoCompare

[ Source](https://github.com/Kirill-Gorelov/hmac)[ Packagist](https://packagist.org/packages/hmac/hmac)[ RSS](/packages/hmac-hmac/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

hmac
====

[](#hmac)

Класс для создания подписи массива и проверки отправителя

composer
--------

[](#composer)

composer require hmac/hmac

Как использовать
----------------

[](#как-использовать)

Пример в папке `example`

```
require_once __DIR__.'/../src/php/hmac.php';
// use kirill\hmac;

$hmac = new kirill\hmac\Hmac;
// var_dump($hmac);

define('PUBLIC_KEY','test_key');
define('PRIVATE_KEY','test_key_private');

$arr = array('login'=>'My_login',
             'password'=>'My_pass',
             'email'=>'My_email');

$signature = $hmac->make_data_hmac($arr, PRIVATE_KEY);
var_dump($signature);
var_dump($hmac->check_data_hmac($arr, PRIVATE_KEY,$signature));
```

`make_data_hmac` - создает подпись, принимаю массив и закрытый ключ.
`check_data_hmac`- проверят подпись, принимая массив, закрытый ключ и сгенерированную подпись для проверки.

Пример на Python
----------------

[](#пример-на-python)

Так же написан класс на python. Что бы можно было обмениваться подписями на двух языках. Пример и сак класс в папке `python/`

### пример

[](#пример)

```
hmac_p = Hmac()
r = hmac_p.make_data_hmac(arr,key)
print(r)

rez = hmac_p.check_data_hmac(arr,key,r)
print(rez)
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

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

2760d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/919fc572955327e82737c97ec71b952edd0461c6986808639206475cf7be8efd?d=identicon)[Kirill\_Gorelov](/maintainers/Kirill_Gorelov)

---

Top Contributors

[![gorelov-ener](https://avatars.githubusercontent.com/u/39524720?v=4)](https://github.com/gorelov-ener "gorelov-ener (9 commits)")[![Kirill-Gorelov](https://avatars.githubusercontent.com/u/29424128?v=4)](https://github.com/Kirill-Gorelov "Kirill-Gorelov (1 commits)")

### Embed Badge

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

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

PHPackages © 2026

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