PHPackages                             markuspaks/xades-tools - 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. [Security](/categories/security)
4. /
5. markuspaks/xades-tools

ActiveLibrary[Security](/categories/security)

markuspaks/xades-tools
======================

Sign files and verify signatures using XAdES

1.0.8(2y ago)0582↓85.4%1MITPHPPHP ^8.1

Since Sep 24Pushed 2y agoCompare

[ Source](https://github.com/markuspaks/xades-tools)[ Packagist](https://packagist.org/packages/markuspaks/xades-tools)[ RSS](/packages/markuspaks-xades-tools/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (10)Used By (0)

API:
====

[](#api)

### Signing

[](#signing)

```
use XadesTools\Settings;
use XadesTools\Signature;
$settings = new Settings($pathToCertificate, $passphrase);
$xades = new Signature($settings);
$signedXmlAsString = $xades->signFile($file, $embed);
```

### Verification, content extraction

[](#verification-content-extraction)

```
use XadesTools\Verification;
$xades = new Verification();
$result = $xades->verifyFile($pathToXadesFile);
if ($result) {
    $content = $res->content; // binary content or plain text for xml files
    $signTime = $res->dateSigned; // DateTime object
    $signingSubject = $res->signingSubject; // array
} else {
    // Signature does not match signed content
}
```

COMMAND LINE USAGE:
===================

[](#command-line-usage)

### Signing file

[](#signing-file)

```
php bin/sign.php file cert pass [embed] [load-content]
```

Where:

- `file` - path to file we want to sign. Signature will be created in the same folder, with .XAdES extension
- `cert` - certificate in PKCS#12 format (.p12) - with private key
- `pass` - password for p12 file
- `embed` - if true, signature will embed given file
- `load-content` - loads file content into variable and signs it as embedded object

Results in `file.XAdES` located in the same directory as given `file`

### Verification

[](#verification)

```
php src/verify.php file [verbose]
```

Where:

- `file` is path to .XAdES file
- `verbose` if true print additional info about sign time and
- `load-content` - loads file content into variable and verifies it as embedded object (can not rely on files on disk)

Verifies content in given XAdES file, prints `OK` if everything passes, error message otherwise.

### Extracting file from XAdES files

[](#extracting-file-from-xades-files)

```
php src/extract.php file output
```

Where:

- `file` is path to .XAdES file with embedded object
- `output` path for output file

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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 ~1 days

Total

9

Last Release

991d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5a567ab6543907b25a449bcf9b6649a7a65ac3cf62969e1dd1313071c3ae8117?d=identicon)[jaffe](/maintainers/jaffe)

---

Top Contributors

[![srsbiz](https://avatars.githubusercontent.com/u/1525842?v=4)](https://github.com/srsbiz "srsbiz (4 commits)")[![luczkaw](https://avatars.githubusercontent.com/u/29858521?v=4)](https://github.com/luczkaw "luczkaw (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/markuspaks-xades-tools/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M373](/packages/easycorp-easyadmin-bundle)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1155.2k](/packages/rcsofttech-audit-trail-bundle)[web-auth/webauthn-lib

FIDO2/Webauthn Support For PHP

1237.8M120](/packages/web-auth-webauthn-lib)

PHPackages © 2026

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