PHPackages                             matasarei/euspe - 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. matasarei/euspe

ActiveLibrary

matasarei/euspe
===============

OOP interfaces for the EUSign PHP library

1.1.0(1y ago)02.4k↓47.7%MITPHPPHP &gt;=7.4CI passing

Since Jul 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/matasarei/euspe)[ Packagist](https://packagist.org/packages/matasarei/euspe)[ RSS](/packages/matasarei-euspe/feed)WikiDiscussions main Synced 1mo ago

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

euspe
=====

[](#euspe)

[![CI workflow](https://github.com/matasarei/euspe/actions/workflows/tests.yml/badge.svg)](https://github.com/matasarei/euspe/actions/workflows/tests.yml/badge.svg)

OOP interfaces for the [EUSign PHP library](https://iit.com.ua/downloads). The PHP extension is included in [releases](https://github.com/matasarei/euspe/releases).

Usage
-----

[](#usage)

Similar to `euspe_*` functions, but with OOP interfaces.

Decrypt signed data:

```
$crypto = new Matasar\Euspe\Crypto(); // initializes the library

try {
    // EUSignTest.php \develop()
    $result = $crypto->develop('path/to/private_key', 'password', 'encrypted_data');
    var_dump($result->signInfo->data); // decrypted data
} catch (\Matasar\Euspe\Exception\DecryptionException $e) {
    //...
}
```

Hash data for signing:

```
$crypto = new Matasar\Euspe\Crypto();
try {
    $hash = $crypto->hash('path/to/file', Matasar\Euspe\Crypto::HASH_FILE);
    var_dump(base64_encode($hash));

    $hash = $crypto->hash('qwerty', Matasar\Euspe\Crypto::HASH_DATA); // hash string
    var_dump(base64_encode($hash));
} catch (\Matasar\Euspe\Exception\EncryptionException $e) {
    //...
}
```

Validating signature by hash:

```
$crypto = new Matasar\Euspe\Crypto();
try {
    /** @var \Matasar\Euspe\Dto\SignInfo $info */
    $info = $crypto->verify('signature', 'hash');
} catch (\Matasar\Euspe\Exception\DecryptionException $e) {
    //...
}
```

Tests and development
---------------------

[](#tests-and-development)

The tests don't do any real cryptography testing, as this is only a wrapper for the library.

1. Install vendors

```
docker run --rm -v $(pwd):/app -w /app composer:lts composer install --ignore-platform-reqs
```

Important

The `--ignore-platform-req=ext-eusphpe` flag is required to avoid the extension requirement.

2. Run tests

```
docker run --rm -v $(pwd):/app -w /app composer:lts vendor/bin/phpunit
```

Recommendations to install the EUSign extension
-----------------------------------------------

[](#recommendations-to-install-the-eusign-extension)

1. Unpack and copy library files:

```
cp .../eusphpe.ini /etc/php/7.4/mods-available/eusphpe.ini
cp -R .../eusphpe_extension /usr/lib/php/eusphpe_extension
```

2. Make symlinks to the configuration file:

```
ln -s /etc/php/7.4/mods-available/eusphpe.ini /etc/php/7.4/fpm/conf.d/20-eusphpe.ini
ln -s /etc/php/7.4/mods-available/eusphpe.ini /etc/php/7.4/cli/conf.d/20-eusphpe.ini
```

3. Restart the FPM service
4. If you have certificates install them (by default in `/data/certificates`, see `osplm.ini`):

```
ls -la /data/certificates/
-rw-rw-r-- 1 root root 876543 Feb 24 2022 CACertificates.p7b
-rw-rw-r-- 1 root root  12345 Feb 24 2022 CAs.json
-rw-rw-r-- 1 root root   1234 Feb 24 2022 EU-xxxxxx.cer
-rw-rw-r-- 1 root root   1234 Feb 24 2022 EU-xxxxxx.cer
```

Important

You will likely need the original `osplm.ini` file and not the one which provided with the library demo. The `eusphpe` extension is compiled for x86\_64 architecture, so it can't run on ARM natively.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance42

Moderate activity, may be stable

Popularity21

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.

###  Release Activity

Cadence

Every ~98 days

Total

2

Last Release

575d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/44632227efd38dd8598ceb71812e223865e994f1f35f027b423469133fb29d6b?d=identicon)[matasarei](/maintainers/matasarei)

---

Top Contributors

[![matasarei](https://avatars.githubusercontent.com/u/6638367?v=4)](https://github.com/matasarei "matasarei (12 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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